From 2eff724ed98b42b9022466575a455481b91e8d46 Mon Sep 17 00:00:00 2001 From: Jacan Chaplais Date: Wed, 31 Aug 2022 11:43:55 +0100 Subject: [PATCH] update graphicle dependency, and updated docs --- setup.cfg | 2 +- showerpipe/generator.py | 21 +++++++++++++++------ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/setup.cfg b/setup.cfg index f73393a..649a158 100644 --- a/setup.cfg +++ b/setup.cfg @@ -24,7 +24,7 @@ install_requires = omegaconf numpy pandas - graphicle==0.1b2 + graphicle>=0.1.0 heparchy==0.2b1 typicle>=0.1.4 diff --git a/showerpipe/generator.py b/showerpipe/generator.py index 5fc6f4b..89a5efe 100644 --- a/showerpipe/generator.py +++ b/showerpipe/generator.py @@ -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. @@ -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 @@ -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