:mod:`km3modules.mc` ==================== .. py:module:: km3modules.mc .. autoapi-nested-parse:: MC Helpers. .. !! processed by numpydoc !! Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: km3modules.mc.GlobalRandomState km3modules.mc.McTruth km3modules.mc.MCTimeCorrector Functions ~~~~~~~~~ .. autoapisummary:: km3modules.mc.convert_mc_times_to_jte_times .. data:: NEUTRINOS .. py:class:: GlobalRandomState Bases::class:`km3pipe.Module` Sets the global random seed of the numpy random generator KM3Pipe uses numpy routines exclusively to generate randomness. Setting a seed to a specific value will create a fully reproducible pipeline as long as your own modules also utilise numpy for random numbers. :Parameters: **seed: int, default=42** .. .. !! processed by numpydoc !! .. attribute:: random_state .. method:: configure(self) .. py:class:: McTruth Bases::class:`km3pipe.Module` Extract MC info of 1st MC track. :Parameters: **most_energetic_primary: bool, default=True** .. .. !! processed by numpydoc !! .. method:: configure(self) .. classmethod:: t2f(cls, row) .. classmethod:: is_nu(cls, flavor) .. method:: process(self, blob) .. function:: convert_mc_times_to_jte_times(times_mc, evt_timestamp_in_ns, evt_mc_time) Function that converts MC times to JTE times. :Parameters: **times_mc** : np.ndarray Time array with MC times. **evt_timestamp_in_ns** : int Total timestamp of the event in nanoseconds. **evt_mc_time** : int Mc time of the event in nanoseconds. :Returns: **ndarray** Converted time array with JTE times. .. !! processed by numpydoc !! .. py:class:: MCTimeCorrector Bases::class:`km3pipe.Module` Module that converts MC hit times to JTE times. Thus, the following tables need to be converted: - mc_tracks - mc_hits :Parameters: **mc_hits_key** : str, optional Name of the mc_hits to convert (default: 'McHits'). **mc_tracks_key** : str, optional Name of the mc_tracks to convert (default: 'McTracks'). **event_info_key** : str, optional Name of the event_info to store this in (default: 'EventInfo'). .. !! processed by numpydoc !! .. method:: configure(self) .. method:: process(self, blob)