km3pipe.mc
¶
Monte Carlo related things.
Module Contents¶
Functions¶
geant2pdg (geant_code) |
Convert GEANT particle ID to PDG |
pdg2name (pdg_id) |
Convert PDG ID to human readable names |
name2pdg (name) |
|
most_energetic (df) |
Grab most energetic particle from mc_tracks dataframe. |
leading_particle (df) |
Grab leading particle (neutrino, most energetic bundle muon). |
get_flavor (pdg_types) |
Build a ‘flavor’ from the ‘type’ column. |
_p_eq_nu (pdg_type) |
|
_p_eq_mu (pdg_type) |
|
is_neutrino (pdg_types) |
flavor string -> is_neutrino |
is_muon (pdg_types) |
flavor string -> is_neutrino |
-
km3pipe.mc.
leading_particle
(df)[source]¶ 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