:py:mod:`km3pipe.mc` ==================== .. py:module:: km3pipe.mc .. autoapi-nested-parse:: Monte Carlo related things. .. !! processed by numpydoc !! Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: km3pipe.mc.geant2pdg km3pipe.mc.pdg2name km3pipe.mc.name2pdg km3pipe.mc.most_energetic km3pipe.mc.leading_particle km3pipe.mc.get_flavor km3pipe.mc.is_neutrino km3pipe.mc.is_muon km3pipe.mc.convert_mc_times_to_jte_times Attributes ~~~~~~~~~~ .. autoapisummary:: km3pipe.mc.log .. py:data:: log .. py:function:: geant2pdg(geant_code) Convert GEANT particle ID to PDG .. !! processed by numpydoc !! .. py:function:: pdg2name(pdg_id) Convert PDG ID to human readable names .. !! processed by numpydoc !! .. py:function:: name2pdg(name) Return best match of a PDG ID for the given name .. !! processed by numpydoc !! .. py:function:: most_energetic(df) Grab most energetic particle from mc_tracks dataframe. .. !! processed by numpydoc !! .. py:function:: leading_particle(df) Grab leading particle (neutrino, most energetic bundle muon). Note: selecting the most energetic mc particle does not always select the neutrino! In some sub-percent cases, the post-interaction secondaries can have more energy than the incoming neutrino! aanet convention: mc_tracks[0] = neutrino so grab the first row if the first row is not unique (neutrinos are unique), it's a muon bundle grab the most energetic then .. !! processed by numpydoc !! .. py:function:: get_flavor(pdg_types) Build a 'flavor' from the 'type' column. .. !! processed by numpydoc !! .. py:function:: is_neutrino(pdg_types) flavor string -> is_neutrino .. !! processed by numpydoc !! .. py:function:: is_muon(pdg_types) flavor string -> is_neutrino .. !! processed by numpydoc !! .. py: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 !!