def oneHotEncode_4_evtypes_tau_decay_length(x, r_vals):
    """
    This function one hot encodes the input for the event types 
    cascade, tracks, doubel-bang, starting tracks
    """
    cascade = [1., 0., 0., 0.]
    track = [0., 1., 0., 0.]
    doublebang = [0., 0., 1., 0.]
    s_track = [0., 0., 0., 1.]
    cut = 5. # aus config auslesen, no hardcode
    # map x to possible classes
    if int(x) in [5, 6]:
        if r_vals[8] >= cut:
            return doublebang
        else:
            return cascade
    else:
        mapping = {0: cascade, 1: cascade, 2: track, 3: s_track, 4: track,
                   5: doublebang, 6: doublebang, 7: cascade, 8: track, 9: cascade}
        return mapping[int(x)]