예제 #1
0
    tmpDataset.setSumWeight(filePath,sumWeight,inUFTier2)
    #componentList.append(tmpDataset)
    if parentName not in sampleDict:
        sampleDict[parentName] = tmpDataset
    else:
        sampleDict[parentName].add(tmpDataset)

# Exceptionally handling TT Powheg sample
TT_pow_comps = makeComponents("TT_pow","/cms/data/store/user/klo/HeppyTree/heppy_80X_RA5_Legacy/July18_v1/TT_pow/180712_162135/0000/",treeName,inUFTier2)
TT_pow = Dataset("TT_pow",ComponentList([]),xs=1.)
TT_pow.sumw = 0.
for comp in TT_pow_comps:
    temp_comp_list = ComponentList([comp])
    tmpDataset = Dataset("TT_pow",temp_comp_list,xs=1.)
    tmpDataset.setSumWeight(comp.path,sumWeight,inUFTier2)
    TT_pow.add(tmpDataset)

TT_pow_ext3_comps = makeComponents("TT_pow","/cms/data/store/user/klo/HeppyTree/heppy_80X_RA5_Legacy/July18_v1/TT_pow/180712_162135/0000/",treeName,inUFTier2)
TT_pow_ext3 = Dataset("TT_pow_ext3",ComponentList([]),xs=1.)
TT_pow_ext3.sumw = 0.
for comp in TT_pow_ext3_comps:
    temp_comp_list = ComponentList([comp])
    tmpDataset = Dataset("TT_pow_ext3",temp_comp_list,xs=1.)
    tmpDataset.setSumWeight(comp.path,sumWeight,inUFTier2)
    TT_pow_ext3.add(tmpDataset)
TT_pow.add(TT_pow_ext3)

componentList = sampleDict.values() + [TT_pow]

#print sampleFileNames 
#for component in componentList:
        qqZZext1_cmpList,
        isMC                = True,
        xs                  = 1.256,
        )
handleSumWeight(
        qqZZTo4L_ext1,
        system,
        bkgTreeDir_qqZZext1+"ZZTo4L_13TeV_powheg_pythia8_ext1.root",
        sumWeightHist,
        True,
        saveSumWeightTxt,
        bkgSkimTreeDir_qqZZext1+"ZZTo4L_13TeV_powheg_pythia8_ext1.txt",
        bkgSkimTreeDir_qqZZext1+"ZZTo4L_13TeV_powheg_pythia8_ext1.txt",
        )

qqZZTo4L.add(qqZZTo4L_ext1)

# ____________________________________________________________________________________________________________________________________________ ||
# ggH
ggH_cmpList = ComponentList(
        [ 
            Component("ggH",bkgSkimTreeDir+"GluGluHToZZTo4L_M125_13TeV_powheg2_JHUgenV6_pythia8.root","passedEvents",inUFTier2=inUFTier2),
        ]
        )

ggH = Dataset(
        "ggH",
        ggH_cmpList,
        isMC                = True,
        #xs                  = 0.01218,
        xs                  = 48.52*0.0002768,
예제 #3
0
#cmp = makeComponents(sampleName, TreeDir, "Events", inUFTier2)

cmpList = ComponentList([
    Component(
        "WJetsToLNu_LO",
        TreeDir + sampleName + "/" + "WJetsToLNu_LO_%s_SkimTree.root" % i,
        "tree", inUFTier2) for i in range(0, 2)
])

WJetsToLNu_LO = Dataset(
    "WJetsToLNu_LO",
    cmpList,
    isMC=True,
    xs=1,
)

WJetsToLNu_LO_ext = Dataset(
    "WJetsToLNu_LO_ext",
    ComponentList([]),
    isMC=True,
    xs=1,
)

WJetsToLNu_LO.setSumWeight(filePath1, "SumGenWeights", inUFTier2)
WJetsToLNu_LO_ext.setSumWeight(filePath2, "SumGenWeights", inUFTier2)

WJetsToLNu_LO.add(WJetsToLNu_LO_ext)

Samples = [WJetsToLNu_LO]
예제 #4
0
filePath2 = os.path.join(sumweight_path,sumweightName2,fileName)

#cmp = makeComponents(sampleName, TreeDir, "Events", inUFTier2)

cmpList = ComponentList(
                       [ Component("TTWToLNu",TreeDir + sampleName +"/"+ "TTWToLNu_%s_SkimTree.root"%i,"tree",inUFTier2) for i in range(0,2)]
          )

TTWToLNu_ext= Dataset(
        "TTWToLNu_ext",
        cmpList,
        isMC                = True,
        xs                  = 1,
        )

TTWToLNu_ext2= Dataset(
        "TTWToLNu_ext2",
        ComponentList([]),
        isMC                = True,
        xs                  = 1,
        )

TTWToLNu_ext.setSumWeight(filePath1,"SumGenWeights",inUFTier2)
TTWToLNu_ext2.setSumWeight(filePath2,"SumGenWeights",inUFTier2)

TTWToLNu_ext.add(TTWToLNu_ext2)

Samples = [
        TTWToLNu_ext
        ]