"passedEvents",
              inUFTier2=inUFTier2),
])
DYJetsToLL_M50 = Dataset(
    "DYJetsToLL_M50",
    DYJetsToLL_M50_cmpList,
    isMC=True,
    xs=6104,
)
path_DYJetsToLL_M50 = bkgTreeDirT2 + "DYJetsToLL_M50.root"
if system.getSystemMode() == system.remote_str:
    DYJetsToLL_M50.setSumWeight(path_DYJetsToLL_M50, sumWeightHist, True)
    if saveSumWeightTxt:
        DYJetsToLL_M50.saveSumWeightToPath(bkgTreeDir + "DYJetsToLL_M50.txt")
elif system.getSystemMode() == system.local_str:
    DYJetsToLL_M50.setSumWeightByTxt(bkgTreeDir + "DYJetsToLL_M50.txt")

# ____________________________________________________________________________________________________________________________________________ ||
DYJetsToLL_M10To50_cmpList = ComponentList([
    Component("DYJetsToLL_M10To50",
              bkgTreeDir + "DYJetsToLL_M10To50.root",
              "passedEvents",
              inUFTier2=inUFTier2),
])
DYJetsToLL_M10To50 = Dataset(
    "DYJetsToLL_M10To50",
    DYJetsToLL_M10To50_cmpList,
    isMC=True,
    xs=6104,
)
path_DYJetsToLL_M10To50 = bkgTreeDirT2 + "DYJetsToLL_M10To50.root"
        xs=xsec[bkgName],
        #sumw		= nRun[bkgName],
    )

    if bkgName == "TTJetsHad0" or bkgName == "TTJetsSemiLep0" or bkgName == "TTJets2L2nu0":
        tmpDataset.componentList[
            0].fileName = dir_prefix_TTInc + samples[bkgName] + ".root"
        txtFilePath = txtWhere + samples[bkgName].replace('_Mtt0to700',
                                                          '') + '.txt'
        if not os.path.isfile(txtFilePath):
            tmpDataset.setSumWeightByDir(
                ntupleWhere + samples[bkgName].replace('_Mtt0to700', ''),
                verbose=True)
            tmpDataset.saveSumWeightToPath(txtFilePath)
        else:
            tmpDataset.setSumWeightByTxt(txtFilePath)
        tmpDataset.sumw *= 0.8832
    else:
        if not os.path.isfile(txtWhere + samples[bkgName] + '.txt'):
            tmpDataset.setSumWeightByDir(ntupleWhere + samples[bkgName],
                                         verbose=True)
            tmpDataset.saveSumWeightToPath(txtWhere + samples[bkgName] +
                                           '.txt')
        else:
            tmpDataset.setSumWeightByTxt(txtWhere + samples[bkgName] + '.txt')

    bkgSamples.append(tmpDataset)

# ____________________________________________________________________________________________________________________________________________ ||
dataList = [
    'Data_SingleElectron',