###############################################################################
# (c) Copyright 2019 CERN for the benefit of the LHCb Collaboration           #
#                                                                             #
# This software is distributed under the terms of the GNU General Public      #
# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING".   #
#                                                                             #
# In applying this licence, CERN does not waive the privileges and immunities #
# granted to it by virtue of its status as an Intergovernmental Organization  #
# or submit itself to any jurisdiction.                                       #
###############################################################################
#
# flake8: noqa


from collections import defaultdict


def getCompare():
    basedict = {
        "long": {},
        "long_fromB": {},
        "long_fromB_P>5GeV": {},
        "long_fromB_P>3GeV_Pt>0.5GeV": {},
    }

    basedict["long"]["BestLong"] = "01_long"
    basedict["long"]["Seed"] = "02_long"
    basedict["long"]["Match"] = "01_long"
    basedict["long"]["MergedMatch"] = "01_long"
    basedict["long"]["DefaultMatch"] = "01_long"
    basedict["long"]["Forward"] = "01_long"

    basedict["long_fromB"]["BestLong"] = "05_long_fromB"
    basedict["long_fromB"]["Seed"] = "04_long_fromB"
    basedict["long_fromB"]["Match"] = "05_long_fromB"
    basedict["long_fromB"]["MergedMatch"] = "05_long_fromB"
    basedict["long_fromB"]["DefaultMatch"] = "05_long_fromB"
    basedict["long_fromB"]["Forward"] = "05_long_fromB"

    basedict["long_fromB_P>5GeV"]["BestLong"] = "06_long_fromB_P>5GeV"
    basedict["long_fromB_P>5GeV"]["Seed"] = "05_long_fromB_P>5GeV"
    basedict["long_fromB_P>5GeV"]["Match"] = "06_long_fromB_P>5GeV"
    basedict["long_fromB_P>5GeV"]["Forward"] = "06_long_fromB_P>5GeV"

    basedict["long_fromB_P>3GeV_Pt>0.5GeV"][
        "BestLong"
    ] = "10_long_fromB_P>3GeV_Pt>0.5GeV"
    basedict["long_fromB_P>3GeV_Pt>0.5GeV"]["Seed"] = "04_long_fromB"
    basedict["long_fromB_P>3GeV_Pt>0.5GeV"]["Match"] = "10_long_fromB_P>3GeV_Pt>0.5GeV"
    basedict["long_fromB_P>3GeV_Pt>0.5GeV"][
        "Forward"
    ] = "10_long_fromB_P>3GeV_Pt>0.5GeV"

    return basedict


def getCompColors():
    basedict = {
        "Forward": {},
        "Match": {},
        "MergedMatch": {},
        "DefaultMatch": {},
        "Seed": {},
        "BestLong": {},
    }

    basedict["Forward"] = 0
    basedict["Match"] = 4
    basedict["MergedMatch"] = 4
    basedict["DefaultMatch"] = 4
    basedict["Seed"] = 6
    basedict["BestLong"] = 1

    return basedict
