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)

Return best match of a PDG ID for the given 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.

is_neutrino(pdg_types)

flavor string -> is_neutrino

is_muon(pdg_types)

flavor string -> is_neutrino

convert_mc_times_to_jte_times(times_mc, ...)

Function that converts MC times to JTE times.

Attributes

log

km3pipe.mc.log[source]
km3pipe.mc.geant2pdg(geant_code)[source]

Convert GEANT particle ID to PDG

km3pipe.mc.pdg2name(pdg_id)[source]

Convert PDG ID to human readable names

km3pipe.mc.name2pdg(name)[source]

Return best match of a PDG ID for the given name

km3pipe.mc.most_energetic(df)[source]

Grab most energetic particle from mc_tracks dataframe.

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

km3pipe.mc.get_flavor(pdg_types)[source]

Build a ‘flavor’ from the ‘type’ column.

km3pipe.mc.is_neutrino(pdg_types)[source]

flavor string -> is_neutrino

km3pipe.mc.is_muon(pdg_types)[source]

flavor string -> is_neutrino

km3pipe.mc.convert_mc_times_to_jte_times(times_mc, evt_timestamp_in_ns, evt_mc_time)[source]

Function that converts MC times to JTE times.

Parameters:
times_mcnp.ndarray

Time array with MC times.

evt_timestamp_in_nsint

Total timestamp of the event in nanoseconds.

evt_mc_timeint

Mc time of the event in nanoseconds.

Returns:
ndarray

Converted time array with JTE times.