How to use the particle.geant.Geant3ID 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 / geant / test_geant3id.py View on Github external
def test_class_string_representations():
    pid = Geant3ID(1)
    assert pid == 1
    assert pid.__str__() == ""
github scikit-hep / particle / tests / geant / test_geant3id.py View on Github external
def test_class_inversion():
    assert -Geant3ID(1) == ~Geant3ID(1)
github scikit-hep / particle / tests / geant / test_geant3id.py View on Github external
def test_class_return_type():
    assert isinstance(-Geant3ID(3), Geant3ID)
    assert isinstance(~Geant3ID(3), Geant3ID)
github scikit-hep / particle / tests / geant / test_geant3id.py View on Github external
def test_from_pdgid():
    assert Geant3ID.from_pdgid(211) == 8

    assert Geant3ID.from_pdgid(PDGID(211)) == 8
    assert Geant3ID.from_pdgid(PDGID(211)) == Geant3ID(8)
github scikit-hep / particle / tests / geant / test_geant3id.py View on Github external
def test_to_pdgid():
    gid = Geant3ID(8)
    assert gid.to_pdgid() == 211
    assert gid.to_pdgid() == PDGID(211)