Skip to content

Commit

Permalink
update graphicle dependency, and updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jacanchaplais committed Aug 31, 2022
1 parent f7140af commit 2eff724
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ install_requires =
omegaconf
numpy
pandas
graphicle==0.1b2
graphicle>=0.1.0
heparchy==0.2b1
typicle>=0.1.4

Expand Down
21 changes: 15 additions & 6 deletions showerpipe/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ class PythiaGenerator(GeneratorAdapter):
out : iterator
Upon iteration a new particle shower is triggered, whose data
is accessible via the following properties:
count : int
The number of particles within the current event.
edges : ndarray
Edge list representing generation ancestry of the event
as a directed acyclic graph.
Expand All @@ -68,6 +70,19 @@ class PythiaGenerator(GeneratorAdapter):
final : ndarray
Mask over the particle list, to extract only those in
their final state.
helicity : ndarray
Polarisation values of each particle, where 9 is a
sentinel for undefined values.
status : ndarray
Pythia status codes describing the role of the particle
during the evolution.
See Pythia documentation
https://pythia.org/latest-manual/ParticleProperties.html
Notes
-----
The len dunder provides the number of events in the
iterator, not to be confused with the count attribute.
"""

import pythia8 as __pythia_lib
Expand Down Expand Up @@ -199,14 +214,8 @@ def final(self) -> np.ndarray:

@property
def helicity(self) -> np.ndarray:
"""The polarisation of the particles. Particles without a
polarisation (or where it is unknown) have a value of 9.
"""
return self.__event_df['helicity'].values

@property
def status(self) -> np.ndarray:
"""Pythia-specific status codes. See link for details.
https://pythia.org/latest-manual/ParticleProperties.html
"""
return self.__event_df['status'].values

0 comments on commit 2eff724

Please sign in to comment.