Exemple #1
0
        totalMCShape.Delete()

    #show
    finalOutpName = outpName
    if countOnly: finalOutpName += '_count'
    plot = Plot(finalOutpName)
    plot.savelog = True
    plot.wideCanvas = False
    plot.doMCOverData = False
    plot.ratioFrameFill = 3444
    plot.ratioFrameColor = 1
    #plot.ratiorange=(0.655,1.385)
    doDivideByBinWidth = False
    if 'mlb' in outpName or 'ptlb' in outpName: doDivideByBinWidth = True
    if relShapeGr: plot.relShapeGr = relShapeGr
    plot.plotformats = ['pdf', 'png']
    for key in ['Data', 't#bar{t}', 'Single top', 'W', 'DY', 'Multiboson']:
        if not key in plotsPerProc: continue
        isData = True if 'Data' in plotsPerProc[key].GetTitle() else False
        color = COLORS[plotsPerProc[key].GetTitle()]
        if key == 'DY': plotsPerProc[key].Scale(0.83)
        plot.add(plotsPerProc[key], plotsPerProc[key].GetTitle(), color,
                 isData, False, False, doDivideByBinWidth)
    plot.finalize()
    plot.mcUnc = 0.0

    totalMC = sigH.Clone('tmptotal')
    totalMC.Reset('ICE')
    for h in plot.mc:
        totalMC.Add(plot.mc[h])
    plot.normUncGr = ROOT.TGraphErrors(totalMC)
Exemple #2
0
        relShapeGr.SetFillColor(ROOT.kRed)
        relShapeGr.SetLineWidth(2)
        totalMCShape.Delete()

    #show
    plot = Plot(outpName)
    plot.savelog = True
    plot.wideCanvas = False
    plot.doMCOverData = False
    plot.ratioFrameFill = 3444
    plot.ratioFrameColor = 1
    #plot.ratiorange=(0.655,1.385)
    doDivideByBinWidth = False
    if 'mlb' in outpName or 'ptlb' in outpName: doDivideByBinWidth = True
    if relShapeGr: plot.relShapeGr = relShapeGr
    plot.plotformats = ['root', 'pdf', 'png']
    for key in ['Data', 't#bar{t}', 'Single top', 'W', 'DY', 'Multiboson']:
        if not key in plotsPerProc: continue
        isData = True if 'Data' in plotsPerProc[key].GetTitle() else False
        color = COLORS[plotsPerProc[key].GetTitle()]
        if key == 'DY': plotsPerProc[key].Scale(0.83)
        plot.add(plotsPerProc[key], plotsPerProc[key].GetTitle(), color,
                 isData, False, False, doDivideByBinWidth)
    plot.finalize()
    plot.mcUnc = 0.0

    totalMC = sigH.Clone('tmptotal')
    totalMC.Reset('ICE')
    for h in plot.mc:
        totalMC.Add(plot.mc[h])
    plot.normUncGr = ROOT.TGraphErrors(totalMC)