def get_fitness(traceIsFit, traceFitnessValue):
    """
    Gets a dictionary expressing fitness in a synthetic way from the list of boolean values
    saying if a trace in the log is fit, and the float values of fitness associated to each trace

    Parameters
    ------------
    traceIsFit
        Boolean value that tells if a trace is fit according to the model
    traceFitnessValue
        List of float values of fitness associated to each trace

    Returns
    -----------
    dictionary
        Containing two keys (percFitTraces and averageFitness)
    """
    noTraces = len(traceIsFit)
    fitTraces = len([x for x in traceIsFit if x])
    sumOfFitness = sum(traceFitnessValue)
    percFitTraces = 0.0
    averageFitness = 0.0
    if noTraces > 0:
        percFitTraces = float(100.0 * fitTraces)/float(noTraces)
        averageFitness = float(sumOfFitness)/float(noTraces)
    return {"percFitTraces": percFitTraces, "averageFitness": averageFitness}