How to use the particle.pdgid.is_valid function in particle

To help you get started, we’ve selected a few particle examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github scikit-hep / particle / tests / pdgid / test_functions.py View on Github external
def test_is_valid(PDGIDs):
    assert is_valid(PDGIDs.Photon) == True
    assert is_valid(PDGIDs.Gluon) == True
    assert is_valid(PDGIDs.Electron) == True
    assert is_valid(PDGIDs.AntiMuon) == True
    assert is_valid(PDGIDs.jpsi) == True
    assert is_valid(PDGIDs.Upsilon_1S) == True
    assert is_valid(PDGIDs.PiPlus) == True
    assert is_valid(PDGIDs.KMinus) == True
    assert is_valid(PDGIDs.D0) == True
    assert is_valid(PDGIDs.DPlus) == True
    assert is_valid(PDGIDs.DsPlus) == True
    assert is_valid(PDGIDs.B0) == True
    assert is_valid(PDGIDs.Bs) == True
    assert is_valid(PDGIDs.BcPlus) == True
    assert is_valid(PDGIDs.Proton) == True
    assert is_valid(PDGIDs.LcPlus) == True
    assert is_valid(PDGIDs.Lb) == True
    assert is_valid(PDGIDs.DD1) == True
    assert is_valid(PDGIDs.SD0) == True
    assert is_valid(PDGIDs.Invalid1) == False
    assert is_valid(PDGIDs.Invalid2) == False
github scikit-hep / particle / tests / pdgid / test_functions.py View on Github external
assert is_valid(PDGIDs.Photon) == True
    assert is_valid(PDGIDs.Gluon) == True
    assert is_valid(PDGIDs.Electron) == True
    assert is_valid(PDGIDs.AntiMuon) == True
    assert is_valid(PDGIDs.jpsi) == True
    assert is_valid(PDGIDs.Upsilon_1S) == True
    assert is_valid(PDGIDs.PiPlus) == True
    assert is_valid(PDGIDs.KMinus) == True
    assert is_valid(PDGIDs.D0) == True
    assert is_valid(PDGIDs.DPlus) == True
    assert is_valid(PDGIDs.DsPlus) == True
    assert is_valid(PDGIDs.B0) == True
    assert is_valid(PDGIDs.Bs) == True
    assert is_valid(PDGIDs.BcPlus) == True
    assert is_valid(PDGIDs.Proton) == True
    assert is_valid(PDGIDs.LcPlus) == True
    assert is_valid(PDGIDs.Lb) == True
    assert is_valid(PDGIDs.DD1) == True
    assert is_valid(PDGIDs.SD0) == True
    assert is_valid(PDGIDs.Invalid1) == False
    assert is_valid(PDGIDs.Invalid2) == False
github scikit-hep / particle / tests / pdgid / test_functions.py View on Github external
def test_is_valid(PDGIDs):
    assert is_valid(PDGIDs.Photon) == True
    assert is_valid(PDGIDs.Gluon) == True
    assert is_valid(PDGIDs.Electron) == True
    assert is_valid(PDGIDs.AntiMuon) == True
    assert is_valid(PDGIDs.jpsi) == True
    assert is_valid(PDGIDs.Upsilon_1S) == True
    assert is_valid(PDGIDs.PiPlus) == True
    assert is_valid(PDGIDs.KMinus) == True
    assert is_valid(PDGIDs.D0) == True
    assert is_valid(PDGIDs.DPlus) == True
    assert is_valid(PDGIDs.DsPlus) == True
    assert is_valid(PDGIDs.B0) == True
    assert is_valid(PDGIDs.Bs) == True
    assert is_valid(PDGIDs.BcPlus) == True
    assert is_valid(PDGIDs.Proton) == True
    assert is_valid(PDGIDs.LcPlus) == True
    assert is_valid(PDGIDs.Lb) == True
    assert is_valid(PDGIDs.DD1) == True
    assert is_valid(PDGIDs.SD0) == True
    assert is_valid(PDGIDs.Invalid1) == False
    assert is_valid(PDGIDs.Invalid2) == False
github scikit-hep / particle / tests / pdgid / test_functions.py View on Github external
def test_is_valid(PDGIDs):
    assert is_valid(PDGIDs.Photon) == True
    assert is_valid(PDGIDs.Gluon) == True
    assert is_valid(PDGIDs.Electron) == True
    assert is_valid(PDGIDs.AntiMuon) == True
    assert is_valid(PDGIDs.jpsi) == True
    assert is_valid(PDGIDs.Upsilon_1S) == True
    assert is_valid(PDGIDs.PiPlus) == True
    assert is_valid(PDGIDs.KMinus) == True
    assert is_valid(PDGIDs.D0) == True
    assert is_valid(PDGIDs.DPlus) == True
    assert is_valid(PDGIDs.DsPlus) == True
    assert is_valid(PDGIDs.B0) == True
    assert is_valid(PDGIDs.Bs) == True
    assert is_valid(PDGIDs.BcPlus) == True
    assert is_valid(PDGIDs.Proton) == True
    assert is_valid(PDGIDs.LcPlus) == True
    assert is_valid(PDGIDs.Lb) == True
    assert is_valid(PDGIDs.DD1) == True
    assert is_valid(PDGIDs.SD0) == True
    assert is_valid(PDGIDs.Invalid1) == False
    assert is_valid(PDGIDs.Invalid2) == False
github scikit-hep / particle / tests / pdgid / test_functions.py View on Github external
def test_is_valid(PDGIDs):
    assert is_valid(PDGIDs.Photon) == True
    assert is_valid(PDGIDs.Gluon) == True
    assert is_valid(PDGIDs.Electron) == True
    assert is_valid(PDGIDs.AntiMuon) == True
    assert is_valid(PDGIDs.jpsi) == True
    assert is_valid(PDGIDs.Upsilon_1S) == True
    assert is_valid(PDGIDs.PiPlus) == True
    assert is_valid(PDGIDs.KMinus) == True
    assert is_valid(PDGIDs.D0) == True
    assert is_valid(PDGIDs.DPlus) == True
    assert is_valid(PDGIDs.DsPlus) == True
    assert is_valid(PDGIDs.B0) == True
    assert is_valid(PDGIDs.Bs) == True
    assert is_valid(PDGIDs.BcPlus) == True
    assert is_valid(PDGIDs.Proton) == True
    assert is_valid(PDGIDs.LcPlus) == True
    assert is_valid(PDGIDs.Lb) == True
    assert is_valid(PDGIDs.DD1) == True
    assert is_valid(PDGIDs.SD0) == True
    assert is_valid(PDGIDs.Invalid1) == False
    assert is_valid(PDGIDs.Invalid2) == False
github scikit-hep / particle / tests / pdgid / test_functions.py View on Github external
assert is_valid(PDGIDs.Gluon) == True
    assert is_valid(PDGIDs.Electron) == True
    assert is_valid(PDGIDs.AntiMuon) == True
    assert is_valid(PDGIDs.jpsi) == True
    assert is_valid(PDGIDs.Upsilon_1S) == True
    assert is_valid(PDGIDs.PiPlus) == True
    assert is_valid(PDGIDs.KMinus) == True
    assert is_valid(PDGIDs.D0) == True
    assert is_valid(PDGIDs.DPlus) == True
    assert is_valid(PDGIDs.DsPlus) == True
    assert is_valid(PDGIDs.B0) == True
    assert is_valid(PDGIDs.Bs) == True
    assert is_valid(PDGIDs.BcPlus) == True
    assert is_valid(PDGIDs.Proton) == True
    assert is_valid(PDGIDs.LcPlus) == True
    assert is_valid(PDGIDs.Lb) == True
    assert is_valid(PDGIDs.DD1) == True
    assert is_valid(PDGIDs.SD0) == True
    assert is_valid(PDGIDs.Invalid1) == False
    assert is_valid(PDGIDs.Invalid2) == False
github scikit-hep / particle / tests / pdgid / test_functions.py View on Github external
def test_is_valid(PDGIDs):
    assert is_valid(PDGIDs.Photon) == True
    assert is_valid(PDGIDs.Gluon) == True
    assert is_valid(PDGIDs.Electron) == True
    assert is_valid(PDGIDs.AntiMuon) == True
    assert is_valid(PDGIDs.jpsi) == True
    assert is_valid(PDGIDs.Upsilon_1S) == True
    assert is_valid(PDGIDs.PiPlus) == True
    assert is_valid(PDGIDs.KMinus) == True
    assert is_valid(PDGIDs.D0) == True
    assert is_valid(PDGIDs.DPlus) == True
    assert is_valid(PDGIDs.DsPlus) == True
    assert is_valid(PDGIDs.B0) == True
    assert is_valid(PDGIDs.Bs) == True
    assert is_valid(PDGIDs.BcPlus) == True
    assert is_valid(PDGIDs.Proton) == True
    assert is_valid(PDGIDs.LcPlus) == True
    assert is_valid(PDGIDs.Lb) == True
    assert is_valid(PDGIDs.DD1) == True
    assert is_valid(PDGIDs.SD0) == True
    assert is_valid(PDGIDs.Invalid1) == False
    assert is_valid(PDGIDs.Invalid2) == False
github scikit-hep / particle / tests / pdgid / test_functions.py View on Github external
assert is_valid(PDGIDs.Electron) == True
    assert is_valid(PDGIDs.AntiMuon) == True
    assert is_valid(PDGIDs.jpsi) == True
    assert is_valid(PDGIDs.Upsilon_1S) == True
    assert is_valid(PDGIDs.PiPlus) == True
    assert is_valid(PDGIDs.KMinus) == True
    assert is_valid(PDGIDs.D0) == True
    assert is_valid(PDGIDs.DPlus) == True
    assert is_valid(PDGIDs.DsPlus) == True
    assert is_valid(PDGIDs.B0) == True
    assert is_valid(PDGIDs.Bs) == True
    assert is_valid(PDGIDs.BcPlus) == True
    assert is_valid(PDGIDs.Proton) == True
    assert is_valid(PDGIDs.LcPlus) == True
    assert is_valid(PDGIDs.Lb) == True
    assert is_valid(PDGIDs.DD1) == True
    assert is_valid(PDGIDs.SD0) == True
    assert is_valid(PDGIDs.Invalid1) == False
    assert is_valid(PDGIDs.Invalid2) == False
github scikit-hep / particle / tests / pdgid / test_functions.py View on Github external
def test_is_valid(PDGIDs):
    assert is_valid(PDGIDs.Photon) == True
    assert is_valid(PDGIDs.Gluon) == True
    assert is_valid(PDGIDs.Electron) == True
    assert is_valid(PDGIDs.AntiMuon) == True
    assert is_valid(PDGIDs.jpsi) == True
    assert is_valid(PDGIDs.Upsilon_1S) == True
    assert is_valid(PDGIDs.PiPlus) == True
    assert is_valid(PDGIDs.KMinus) == True
    assert is_valid(PDGIDs.D0) == True
    assert is_valid(PDGIDs.DPlus) == True
    assert is_valid(PDGIDs.DsPlus) == True
    assert is_valid(PDGIDs.B0) == True
    assert is_valid(PDGIDs.Bs) == True
    assert is_valid(PDGIDs.BcPlus) == True
    assert is_valid(PDGIDs.Proton) == True
    assert is_valid(PDGIDs.LcPlus) == True
    assert is_valid(PDGIDs.Lb) == True
    assert is_valid(PDGIDs.DD1) == True
    assert is_valid(PDGIDs.SD0) == True
    assert is_valid(PDGIDs.Invalid1) == False
    assert is_valid(PDGIDs.Invalid2) == False
github scikit-hep / particle / tests / pdgid / test_functions.py View on Github external
def test_is_valid(PDGIDs):
    assert is_valid(PDGIDs.Photon) == True
    assert is_valid(PDGIDs.Gluon) == True
    assert is_valid(PDGIDs.Electron) == True
    assert is_valid(PDGIDs.AntiMuon) == True
    assert is_valid(PDGIDs.jpsi) == True
    assert is_valid(PDGIDs.Upsilon_1S) == True
    assert is_valid(PDGIDs.PiPlus) == True
    assert is_valid(PDGIDs.KMinus) == True
    assert is_valid(PDGIDs.D0) == True
    assert is_valid(PDGIDs.DPlus) == True
    assert is_valid(PDGIDs.DsPlus) == True
    assert is_valid(PDGIDs.B0) == True
    assert is_valid(PDGIDs.Bs) == True
    assert is_valid(PDGIDs.BcPlus) == True
    assert is_valid(PDGIDs.Proton) == True
    assert is_valid(PDGIDs.LcPlus) == True
    assert is_valid(PDGIDs.Lb) == True
    assert is_valid(PDGIDs.DD1) == True
    assert is_valid(PDGIDs.SD0) == True
    assert is_valid(PDGIDs.Invalid1) == False
    assert is_valid(PDGIDs.Invalid2) == False