singleTopSamples = [
    ['SingleTopTWChan_', f_st_tW, xs_st_tW, n_st_tW],
    ['SingleTopTChan_',  f_st_t,  xs_st_t,  n_st_t],
    ['SingleTopSChan_',  f_st_s,  xs_st_s,  n_st_s]
    ]

singleTopLabel = 'SingleTop_'


for ijet in range(1,maxJets) :
    for itag in range(0,maxTags) :
        if itag > ijet :
            continue
        tagDist = tagDists[itag]
        hist = addSingleTops( singleTopLabel, lum, histdir, templatedir, tagDist+'_'+str(ijet)+'j_'+str(itag)+'t', 1.0,
                              singleTopSamples)
        singleTopHists.append(hist)


# ---------------------------------------------
# ---------------------------------------------
#                   STEP 3 : QCD From Data
# ---------------------------------------------

qcdDataHists = []
if useDataQCD :

    qcd_0tag_data_names = [
    'proj_Data_MET_1_0t',
    'proj_Data_MET_2_0t',
    'proj_Data_MET_3_0t',
    ]

singleTopLabel = 'SingleTop_'


for ijet in range(1,maxJets) :
    for itag in range(0,maxTags) :
        if itag > ijet :
            continue
        tagDist = tagDists[itag]
        #if (ijet >3 and itag ==2):
        #    s = 'dijetMass_' + str(ijet) + 'j_' + str(itag) + 't'
        #    print s
        #else:
        s = tagDist + '_' + str(ijet) + 'j_' + str(itag) + 't'
        hist = addSingleTops( singleTopLabel, lum, histdir, templatedir, s , 1.0,
                              singleTopSamples)
        singleTopHists.append(hist)


# ---------------------------------------------
# ---------------------------------------------
#              STEP 3 : QCD From Fits to Data
# ---------------------------------------------

qcdDataHists = []
if useDataQCD :

    qcd_0tag_data_names = [
    'h_qcd_'+var0tag+'_1j_0t',
    'h_qcd_'+var0tag+'_2j_0t',
    'h_qcd_'+var0tag+'_3j_0t',