def plot(histpath, qcdShapeFrom, qcdShapeForSystematics, qcdRateEstimate, rebin=1, suffixes=[]):
    inputFiles = FILES.files
    #get histograms
    if len(suffixes) > 0:
        for suffix in suffixes:
            hist = histpath + '_' + suffix
            histograms = reader.getHistogramDictionary(histpath, inputFiles)
    else:
        histograms = reader.getHistogramDictionary(histpath, inputFiles)
Example #2
0
def plot(histpath,
         qcdShapeFrom,
         qcdShapeForSystematics,
         qcdRateEstimate,
         rebin=1,
         suffixes=[]):
    inputFiles = FILES.files
    #get histograms
    if len(suffixes) > 0:
        for suffix in suffixes:
            hist = histpath + '_' + suffix
            histograms = reader.getHistogramDictionary(histpath, inputFiles)
    else:
        histograms = reader.getHistogramDictionary(histpath, inputFiles)
def getQCDShape(file, histname, histnameForSystematics, rebin=1, suffix=''):
    errors = None
    if not suffix == '':
        histogramForShape = histname + '_' + suffix
        histogramForComparison = histnameForSystematics + '_' + suffix
    histogramForShape = reader.getHistogramFromFile(histogramForShape, file)
    histogramForComparison = reader.getHistogramFromFile(histogramForComparison, file)
    #sum weights for correct error calculation
    histogramForShape.Sumw2()
    histogramForComparison.Sumw2()
    #rebin
    histogramForShape.Rebin(rebin)
    histogramForComparison.Rebin(rebin)
    #get normalisation
    nShape = histogramForShape.Integral()
    nCompare = histogramForComparison.Integral()
def getQCDShape(file, histname, histnameForSystematics, rebin=1, suffix=''):
    errors = None
    if not suffix == '':
        histogramForShape = histname + '_' + suffix
        histogramForComparison = histnameForSystematics + '_' + suffix
    histogramForShape = reader.getHistogramFromFile(histogramForShape, file)
    histogramForComparison = reader.getHistogramFromFile(
        histogramForComparison, file)
    #sum weights for correct error calculation
    histogramForShape.Sumw2()
    histogramForComparison.Sumw2()
    #rebin
    histogramForShape.Rebin(rebin)
    histogramForComparison.Rebin(rebin)
    #get normalisation
    nShape = histogramForShape.Integral()
    nCompare = histogramForComparison.Integral()