pyrex.generation.ListGenerator¶
-
class
pyrex.generation.
ListGenerator
(events, loop=True)¶ Class to generate neutrino events from a list.
Generates events by simply pulling them from a list of
Event
objects. By default returns to the start of the list once the end is reached, but can optionally fail after reaching the list’s end.- Parameters
- eventsEvent, or list of Event
List of
Event
objects to draw from. If only a singleEvent
object is given, creates a list of that event alone.- loopboolean, optional
Whether or not to return to the start of the list after throwing the last
Event
. IfFalse
, raises an error if trying to throw after the lastEvent
.
See also
pyrex.Event
Class for storing a tree of
Particle
objects representing an event.pyrex.Particle
Class for storing particle attributes.
- Attributes
count
intNumber of neutrinos produced by the generator.
- eventslist of Event
List to draw
Event
objects from, sequentially.- loopboolean
Whether or not to loop through the list more than once.
Methods
Generate a neutrino event.