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

def 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
    """
    leading = df.groupby('event_id', as_index=False).first()
    unique = leading.type.unique()

    if len(unique) == 1 and unique[0] == 0:
        leading = most_energetic(df)
    return leading