Last active
August 3, 2017 05:12
-
-
Save ndawe/0651e08fa5098f892df7fa872b007218 to your computer and use it in GitHub Desktop.
pyjet and numpythia
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from numpythia import Pythia | |
from numpythia import STATUS, HAS_END_VERTEX, ABS_PDG_ID | |
from numpythia.testcmnd import get_cmnd | |
from pyjet import cluster | |
pythia = Pythia(get_cmnd('w'), random_state=1) | |
selection = ((STATUS == 1) & ~HAS_END_VERTEX & | |
(ABS_PDG_ID != 12) & (ABS_PDG_ID != 14) & (ABS_PDG_ID != 16)) | |
# generate one event | |
for event in pythia(events=1): | |
jets = cluster(event.all(selection), R=0.5, p=-1).inclusive_jets(ptmin=3) | |
# constituents of leading jet as numpy array | |
constits = jets[0].constituents_array() | |
print(constits) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment