- class showerpipe.generator.PythiaGenerator(showerpipe.base.GeneratorAdapter)[source]
Wrapper of Pythia8 generator. Provides an iterator over successive showered events in a PythiaEvent instance, whose properties expose the data via NumPy arrays.
- Parameters:¶
- config_file : Path | str | file_like
Pythia cmnd configuration file. If path or string, it is assumed that the input refers to the location of a file on disk. If file object, it must be in a readable mode.
- lhe_file : Path | str | bytes, optional
The variable or filepath containing the LHE data. May be a path, string, or bytes object. If path to file, may be compressed with gzip.
- rng_seed : int
Seed passed to the random number generator used by Pythia.
- quiet : bool
Whether to quieten
pythia8during data generation. Default isTrue.
- Raises:¶
NotImplementedError – If length of iterator is accessed, without a LHE file passed during initialisation.
ValueError – If
rng_seedpassed during initialisation is less than -1.RuntimeError – If Pythia fails to initialise.
Public members¶
- PythiaGenerator(config_file: str | Path | TextIO, ...)[source]
Initialize self. See help(type(self)) for accurate signature.
- __next__() PythiaEvent[source]
Return the next item from the iterator. When exhausted, raise StopIteration
- overwrite_event(new_event: PythiaEvent) None[source]
Replaces contents of the current event in the generator.
- classmethod __subclasshook__(C)[source]
Abstract classes can override this to customize issubclass().
-
PythiaGenerator =
<bound method GenericAlias of <class 'collections.abc.Iterable'>>[source]
- classmethod __init_subclass__(*args, **kwargs)[source]
This method is called when a class is subclassed.
Last update:
Jun 27, 2025