pyrex.generation.FileGenerator¶
-
class
pyrex.generation.FileGenerator(files, slice_range=100, interaction_model=<class 'pyrex.particle.CTWInteraction'>)¶ Class to generate neutrino events from simulation file(s).
Generates neutrinos by pulling their attributes from a (list of) simulation output file(s). Designed to make reproducing simulations easier.
- Parameters
- filesstr or list of str
List of file names containing neutrino event information. If only a single file name is provided, creates a list with that file alone.
- slice_rangeint, optional
Number of events to load into memory at a time from the files. Increasing this value should result in an improvement in speed, while decreasing this value should result in an improvement in memory consumption.
- interaction_modeloptional
Class used to describe the interactions of the stored particles.
Warning
This generator only supports
Eventobjects containing a single level ofParticleobjects. Any dependencies amongParticleobjects will be ignored and they will all appear in the root level.See also
pyrex.particle.InteractionBase class for describing neutrino interaction attributes.
pyrex.EventClass for storing a tree of
Particleobjects representing an event.pyrex.ParticleClass for storing particle attributes.
- Attributes
countintNumber of neutrinos produced by the generator.
- fileslist of str
List of file names containing neutrino information.
Methods
Generate a neutrino.
