Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong visualization #75

Open
jackerschott opened this issue Mar 25, 2024 · 0 comments
Open

Wrong visualization #75

jackerschott opened this issue Mar 25, 2024 · 0 comments

Comments

@jackerschott
Copy link

Take the following hepmc2 file containing a single semileptonic ttH event: events.zip and visualize this event using pyhepmc version 2.13.2 to a pdf (I am piping to dot -Tpdf > event.pdf):

with pyhepmc.open("test.hepmc") as f:
    event = f.read()
    print(to_dot(event))

The resulting event contains two W bosons (which one can easily search for in the PDF) one of which contains into a single up quark and nothing else. However if I do

import pyhepmc
import numpy as np

with pyhepmc.open("test.hepmc") as f:
    event = f.read()
    for particle in event.particles:
        if np.abs(particle.pid) == 24:
            print(len(particle.children))

I can see that len(particle.children) is 2 for both W bosons as it should be. Seems like there is a bug in the to_dot function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant