def standard_spaces(type):
    s_spaces={
            #eval("\"data_histograms/iHist_m0_m12_%s\"     : pd(\"%s\", \"m0\",  \"m12\" )" % (type,type) ),
            "data_histograms/iHist_m0_m12_"+type     : pd(type, "m0",  "m12" ),
#            "data_histograms/iHist_m0_tanb_"+type    : pd(type, "m0",  "tanb" ),
#            "data_histograms/iHist_tanb_m12_"+type   : pd(type, "tanb","m12" ),
#            "data_histograms/iHist_mA0_tanb_"+type   : pd(type, "MA"  ,"tanb"),
#            "data_histograms/iHist_A0_tanb_"+type    : pd(type, "A0"  ,"tanb"),
#            "data_histograms/iHist_mhd2_mhu2_"+type  : pd(type, "mhd2"  ,"mhu2"),
          }
    return s_spaces
from config.plot_defaults import getDefaults as pd
from collections import OrderedDict

def get_higgs_plot():
    return higgs_plot


higgs_plot =       {
#            "data_histograms/iHist_m_h^0_dchi"      : pd( "dchi_red_band", "mh" ),
            "smooth_histograms/iHist_m_h^0_dchi"      : pd( "dchi_red_band", "mh" ),
#            "data_histograms/iHist_m_h^0_dchi"      : pd( "dchi", "mh" ),
        }
from config.plot_defaults import getDefaults as pd
from collections import OrderedDict

def get_colour_contour_dict():
    return colour, contour

contour = [
            ["data_histograms/iHist_m0_m12_dchi"       , pd("dchi", "m0",  "m12" )],
#            ["data_histograms/iHist_m0_m12_dchi"       , pd("dchi", "m0",  "m12" )],
#            ["data_histograms/iHist_m0_m12_dchi"       , pd("dchi", "m0",  "m12" )],
#            ["data_histograms/iHist_m0_m12_pred_m_h^0"  ,pd("Pm_h0", "m0",  "m12" )],
#            ["data_histograms/iHist_m0_m12_pred_Bsmumu" ,pd("Pbsmm", "m0",  "m12" )],
#            ["data_histograms/iHist_mA0_tanb_dchi"     , pd("dchi", "MA"  ,"tanb")],
#            ["data_histograms/iHist_mA0_tanb_dchi"     , pd("dchi", "MA"  ,"tanb")],
#            ["data_histograms/iHist_mA0_tanb_dchi"     , pd("dchi", "MA"  ,"tanb")],
#            ["data_histograms/iHist_neu1_sigma_pp^SI_cm-2_dchi"   , pd("dchi", "mneu1"  ,"ssicm")],
         ]


colour =[
#            ["data_histograms/iHist_m0_m12_dchi"     , pd("dchi", "m0",  "m12" )],
#            ["data_histograms/iHist_m0_m12_dchi"     , pd("dchi", "m0",  "m12" )],
#          [  "data_histograms/iHist_m0_m12_pred_MW"          , pd("PMW", "m0"  ,"m12") ], 
#          [  "data_histograms/iHist_m0_m12_pred_Bsmumu"      , pd("Pbsmm", "m0"  ,"m12") ], 
#          [  "data_histograms/iHist_m0_m12_pred_tanb"       , pd("Ptanb", "m0"  ,"m12") ], 
#           [ "data_histograms/iHist_m0_m12_chi2"            , pd("chi2", "m0",  "m12" ),],
#          [  "data_histograms/iHist_m0_m12_pred_Oh^2"        , pd("POh2", "m0",  "m12" ) ],
#          [  "data_histograms/iHist_m0_m12_pred_m_h^0"       , pd("Pm_h0", "m0",  "m12" )],
#          [  "data_histograms/iHist_mA0_tanb_dchi"        , pd("dchi", "MA"  ,"tanb")],
#          [  "data_histograms/iHist_mA0_tanb_pred_MW"        , pd("PMW", "MA"  ,"tanb")],
#          [  "data_histograms/iHist_mA0_tanb_pred_Bsmumu"    , pd("Pbsmm", "MA"  ,"tanb")],
from config.plot_defaults import getDefaults as pd

def getSpaceDict() :
    return spaces

def get1DDict() :
    return hists


hists = {
            "data_histograms/iHist_neu1_dchi"     : pd( "dchi", "neu1" ),
            "data_histograms/iHist_m_h^0_dchi"    : pd( "dchi", "m_h^0" )
        }

spaces = { 
            "data_histograms/iHist_m0_m12_chi2"   : pd("chi2", "m0",  "m12" ),
            "data_histograms/iHist_m0_m12_pval"   : pd("pval", "m0",  "m12" ),
            "data_histograms/iHist_m0_m12_dchi"   : pd("dchi", "m0",  "m12" ),
            "data_histograms/iHist_m0_tanb_chi2"  : pd("chi2", "m0",  "tanb"),
            "data_histograms/iHist_m0_tanb_pval"  : pd("pval", "m0",  "tanb"),
            "data_histograms/iHist_m0_tanb_dchi"  : pd("dchi", "m0",  "tanb"),
            "data_histograms/iHist_tanb_m12_chi2" : pd("chi2", "tanb","m12" ),
            "data_histograms/iHist_tanb_m12_pval" : pd("pval", "tanb","m12" ),
            "data_histograms/iHist_tanb_m12_dchi" : pd("dchi", "tanb","m12" ),
         }
from config.plot_defaults import getDefaults as pd
from collections import OrderedDict


def get_1d_overlay_dict() :
    return dlh_overlay

dlh_overlay = {
#              "data_histograms/iHist_Bsmumu_dchi"     : pd("dchi", "bsmm" ),
#            "data_histograms/iHist_m_h^0_dchi"      : pd( "dchi", "mh" ),
#            "data_histograms/iHist_BsmumuRatio_dchi"     : pd("dchi", "bsmmratio" ),
#           "data_histograms/iHist_stau_1_dchi"     : pd("dchi","mstau1"),
#            "data_histograms/iHist_gluino_dchi"     : pd("dchi", "mg"   ),
#            "data_histograms/iHist_squark_r_dchi"  : pd("dchi", "msqr" ),
#            "data_histograms/iHist_stop1_dchi"  : pd("dchi", "stop1" ),
            "smooth_histograms/iHist_BsmumuRatio_dchi"     : pd("dchi", "bsmmratio" ),
#            "smooth_histograms/iHist_stau_1_dchi"     : pd("dchi","mstau1"),
#            "smooth_histograms/iHist_gluino_dchi"     : pd("dchi", "mg"   ),
#            "smooth_histograms/iHist_squark_r_dchi"  : pd("dchi", "msqr" ),
#            "smooth_histograms/iHist_stop1_dchi"  : pd("dchi", "stop1" ),
###              "data_histograms/iHist_BsmumuRatio_dchi"     : pd("dchi", "bsmmratio" ),
#                "data_histograms/iHist_neu1_dchi"     : pd("dchi", "mneu1" ),
               }

from config.plot_defaults import getDefaults as pd
from collections import OrderedDict


def get_space_overlay_dict() :
    return space_overlay

space_overlay = {
            "data_histograms/iHist_m0_m12_dchi"     : pd("dchi", "m0",  "m12" ),
            "data_histograms/iHist_m0_tanb_dchi"    : pd("dchi", "m0",  "tanb" ),
            "data_histograms/iHist_tanb_m12_dchi"   : pd("dchi", "tanb","m12" ),
            "data_histograms/iHist_mA0_tanb_dchi"   : pd("dchi", "MA"  ,"tanb"),
            "data_histograms/iHist_neu1_sigma_pp^SI_cm-2_dchi"   : pd("dchi", "mneu1"  ,"ssicm"),
                }
    return grid_hists


def get_grid_spaces():
    return grid_spaces


def get_grid_size_x_y():
    return grid_size_x_y


grid_size_x_y = [26, 5]

grid_spaces = OrderedDict()
grid_spaces = {
    "data_histograms/iHist_m0_m12_chi2": pd("chi2", "m0", "m12"),
    "data_histograms/iHist_m0_m12_dchi": pd("dchi", "m0", "m12"),
    "data_histograms/iHist_m0_m12_pred_m_h^0": pd("Pm_h0", "m0", "m12"),
    "data_histograms/iHist_m0_m12_pred_Bsmumu": pd("Pbsmm", "m0", "m12"),
    "data_histograms/iHist_m0_m12_pred_R(b->sg)": pd("PRbsg", "m0", "m12"),
    "data_histograms/iHist_m0_m12_pred_R(D_ms)": pd("PRDms", "m0", "m12"),
    "data_histograms/iHist_m0_m12_pred_R(B->taunu)": pd("PRBtaunu", "m0", "m12"),
    "data_histograms/iHist_m0_m12_pred_R(B->Xsll)": pd("PRBXsll", "m0", "m12"),
    "data_histograms/iHist_m0_m12_pred_R(K->lnu)": pd("PRKlnu", "m0", "m12"),
    "data_histograms/iHist_m0_m12_pred_Delta(g-2)": pd("PDeltag2", "m0", "m12"),
    "data_histograms/iHist_m0_m12_pred_MW": pd("PMW", "m0", "m12"),
    "data_histograms/iHist_m0_m12_pred_sintheta_eff": pd("Psintheta_eff", "m0", "m12"),
    "data_histograms/iHist_m0_m12_pred_Gamma_Z": pd("PGamma_Z", "m0", "m12"),
    "data_histograms/iHist_m0_m12_pred_Rl": pd("PRl", "m0", "m12"),
    "data_histograms/iHist_m0_m12_pred_Rb": pd("PRb", "m0", "m12"),
    "data_histograms/iHist_m0_m12_pred_Rc": pd("PRc", "m0", "m12"),
#            "data_histograms/iHist_stau_1_Dm_stau1_neu1_dchi"     : pd("dchi","mstau1", "Dm_stau1_neu1"),
#            "data_histograms/iHist_Dm_stau1_neu1_tanb_dchi"      : pd("dchi", "Dm_stau1_neu1",  "tanb" ),
#            "data_histograms/iHist_Dm_stau1_neu1_m_h^0_chi2"     : pd("chi2", "Dm_stau1_neu1",  "mh" ),
#            "data_histograms/iHist_Dm_stau1_neu1_tanb_chi2"      : pd("chi2", "Dm_stau1_neu1",  "tanb" ),
#            "data_histograms/iHist_Dm_stau1_neu1_tanb_dchi_pred_m_h^0": pd("Pm_h0", "Dm_stau1_neu1",  "tanb" ),
#            "data_histograms/iHist_m0_tanb_dchi"    : pd("dchi", "m0",  "tanb" ),
#            "data_histograms/iHist_m0_tanb_chi2"    : pd("chi2", "m0",  "m12" ),
#            "data_histograms/iHist_tanb_m12_dchi"   : pd("dchi", "tanb","m12" ),
#            "data_histograms/iHist_tanb_m12_chi2"   : pd("chi2", "tanb","m12" ),
#            "data_histograms/iHist_mA0_tanb_dchi"   : pd("dchi", "MA"  ,"tanb"),
#            "data_histograms/iHist_mA0_tanb_chi2"   : pd("chi2", "MA"  ,"tanb"),
##            "data_histograms/iHist_mA0_tanb_pred_m_h^0"     : pd("Pm_h0", "MA"  ,"tanb"),
#            "data_histograms/iHist_mA0_tanb_pred_Bsmumu"    : pd("Pbsmm", "MA"  ,"tanb"),
#            "data_histograms/iHist_neu1_sigma_pp^SI_dchi"   : pd("dchi", "mneu1"  ,"ssi"),
#            "data_histograms/iHist_neu1_sigma_pp^SI_chi2"   : pd("chi2", "mneu1"  ,"ssi"),
            "data_histograms/iHist_neu1_sigma_pp^SI_cm-2_dchi"   : pd("dchi", "mneu1"  ,"ssicm"),
#            "data_histograms/iHist_neu1_sigma_pp^SI_cm-2_chi2"   : pd("chi2", "mneu1"  ,"ssicm"),
####            "data_histograms/iHist_mA0_tanb_pred_Bsmumu"   : pd("Pbsmm", "MA"  ,"tanb"),
#            "data_histograms/iHist_mneu1_ssi_dchi": pd("dchi","mneu1","ssi" ),
        }

def standard_spaces(type):
    s_spaces={
            #eval("\"data_histograms/iHist_m0_m12_%s\"     : pd(\"%s\", \"m0\",  \"m12\" )" % (type,type) ),
            "data_histograms/iHist_m0_m12_"+type     : pd(type, "m0",  "m12" ),
#            "data_histograms/iHist_m0_tanb_"+type    : pd(type, "m0",  "tanb" ),
#            "data_histograms/iHist_tanb_m12_"+type   : pd(type, "tanb","m12" ),
#            "data_histograms/iHist_mA0_tanb_"+type   : pd(type, "MA"  ,"tanb"),
#            "data_histograms/iHist_A0_tanb_"+type    : pd(type, "A0"  ,"tanb"),
#            "data_histograms/iHist_mhd2_mhu2_"+type  : pd(type, "mhd2"  ,"mhu2"),
          }
from config.plot_defaults import getDefaults as pd
from collections import OrderedDict


def get_raw_smooth():
    return raw_smooth


raw_smooth=[
#            (["data_histograms/iHist_stau_1_dchi"       ,  pd("dchi","mstau1")],
#             ["smooth_histograms/iHist_stau_1_dchi"     ,  pd("dchi","mstau1")] ),
#            (["data_histograms/iHist_stop1_dchi"       ,  pd("dchi","stop1")],
#             ["smooth_histograms/iHist_stop1_dchi"     ,  pd("dchi","stop1")] ),
#            (["data_histograms/iHist_gluino_dchi"       ,  pd("dchi","mg")],
#             ["smooth_histograms/iHist_gluino_dchi"     ,  pd("dchi","mg")] ),
#           (["data_histograms/iHist_squark_r_dchi"       ,  pd("dchi","msqr")],
#            ["smooth_histograms/iHist_squark_r_dchi"     ,  pd("dchi","msqr")] ),
            (["data_histograms/iHist_BsmumuRatio_dchi"  ,  pd("dchi", "bsmmratio" )],
             ["smooth_histograms/iHist_BsmumuRatio_dchi",  pd("dchi", "bsmmratio" )] ),
#            (["data_histograms/iHist_m_h^0_dchi"       ,  pd("dchi_red_band","mh")],
#             ["smooth_histograms/iHist_m_h^0_dchi"     ,  pd("dchi_red_band","mh")] ),
#            (["data_histograms/iHist_Dm_stau1_neu1_dchi" ,      pd( "dchi", "Dm_stau1_neu1" )],
#             ["smooth_histograms/iHist_Dm_stau1_neu1_dchi" ,      pd( "dchi", "Dm_stau1_neu1" )])
#            (["data_histograms/iHist_Dm_nslp_lsp_dchi" ,      pd( "dchi", "Dm_nslp_lsp" )],
#             ["smooth_histograms/iHist_Dm_nslp_lsp_dchi" ,      pd( "dchi", "Dm_nslp_lsp" )])
               
                ]


    return grid_spaces

def get_grid_size_x_y():
    return grid_size_x_y

def get_raw_smooth():
    return raw_smooth

def get_stau_plots():
    return stau_plots

grid_size_x_y=[26,5]

grid_spaces=OrderedDict()
grid_spaces={
            "data_histograms/iHist_m0_m12_chi2"             : pd("chi2", "m0",  "m12" ),
            "data_histograms/iHist_m0_m12_dchi"             : pd("dchi", "m0",  "m12" ),
            "data_histograms/iHist_m0_m12_pred_m_h^0"       : pd("Pm_h0", "m0" ,"m12" ),
            "data_histograms/iHist_m0_m12_pred_Bsmumu"      : pd("Pbsmm", "m0"  ,"m12") , 
            "data_histograms/iHist_m0_m12_pred_R(b->sg)"    : pd("PRbsg", "m0"  ,"m12") , 
            "data_histograms/iHist_m0_m12_pred_R(D_ms)"     : pd("PRDms", "m0"  ,"m12") , 
            "data_histograms/iHist_m0_m12_pred_R(B->taunu)" : pd("PRBtaunu", "m0"  ,"m12") , 
            "data_histograms/iHist_m0_m12_pred_R(B->Xsll)"  : pd("PRBXsll", "m0"  ,"m12") , 
            "data_histograms/iHist_m0_m12_pred_R(K->lnu)"   : pd("PRKlnu", "m0"  ,"m12") , 
            "data_histograms/iHist_m0_m12_pred_Delta(g-2)"  : pd("PDeltag2", "m0"  ,"m12") , 
            "data_histograms/iHist_m0_m12_pred_MW"          : pd("PMW", "m0"  ,"m12") , 
            "data_histograms/iHist_m0_m12_pred_sintheta_eff": pd("Psintheta_eff", "m0"  ,"m12") , 
            "data_histograms/iHist_m0_m12_pred_Gamma_Z"     : pd("PGamma_Z"     , "m0"  ,"m12") , 
            "data_histograms/iHist_m0_m12_pred_Rl"          : pd("PRl"          , "m0"  ,"m12") , 
            "data_histograms/iHist_m0_m12_pred_Rb"          : pd("PRb"          , "m0"  ,"m12") , 
            "data_histograms/iHist_m0_m12_pred_Rc"          : pd("PRc"          , "m0"  ,"m12") , 
from config.plot_defaults import getDefaults as pd
from collections import OrderedDict


def get_1d_dict() :
    return hists


hists = {
#            "data_histograms/iHist_neu1_dchi"      : pd( "dchi", "mneu1" ),
#            "data_histograms/iHist_Dm_stau1_neu1_dchi"      : pd( "dchi", "Dm_stau1_neu1" ),
#            "smooth_histograms/iHist_Dm_stau1_neu1_dchi"      : pd( "dchi", "Dm_stau1_neu1" ),
#            "smooth_histograms/iHist_Dm_nslp_lsp_dchi"      : pd( "dchi", "Dm_nslp_lsp" ),
#            "data_histograms/iHist_Dm_nslp_lsp_dchi"      : pd( "dchi", "Dm_nslp_lsp" ),
#            "smooth_histograms/iHist_Dm_nslp_lsp_dchi"      : pd( "dchi", "Dm_nslp_lsp" ),
#            "data_histograms/iHist_m_h^0_dchi"      : pd( "dchi", "mh" ),
            "data_histograms/iHist_stau_1_dchi"     : pd("dchi","mstau1"),
            "data_histograms/iHist_gluino_dchi"     : pd("dchi", "mg"   ),
            "data_histograms/iHist_squark_r_dchi"  : pd("dchi", "msqr" ),
            "data_histograms/iHist_BsmumuRatio_dchi"     : pd("dchi", "bsmmratio" ),
            "data_histograms/iHist_stop1_dchi"  : pd("dchi", "stop1" ),
#            "data_histograms/iHist_stau_1_chi2"         : pd("chi2",    "mstau1"    ),
#            "data_histograms/iHist_gluino_chi2"         : pd("chi2",    "mg"        ),
#            "data_histograms/iHist_squark_r_chi2"       : pd("chi2",    "msqr"      ),
#            "data_histograms/iHist_BsmumuRatio_chi2"    : pd("chi2",    "bsmmratio" ),
#            "data_histograms/iHist_BsmumuRatio_chi2"    : pd("chi2",    "bsmm" ),
#            "data_histograms/iHist_stop1_chi2"          : pd("chi2",    "stop1"     ),
        }