# Compare parameter values
        for par in range(4):
            test = parGraphs[par]
            val = validateGraphs[par]
            myPainter.drawSeveralObservedLimits(
                [test, val], ["Ours", "SWIFT"],
                "{0}/parameterEvolution_par{1}_{2}".format(
                    folder, par, mystring),
                "Bin estimated",
                "Parameter value",
                luminosity,
                13,
                plotxlow,
                plotxhigh,
                "automatic",
                "automatic",
                doLogY=False,
                doLogX=False,
                doRectangular=False,
                doLegendLocation="Right",
                ATLASLabelLocation="BottomL",
                isTomBeingDumb=False,
                addHorizontalLines=[],
                pairNeighbouringLines=False,
                cutLocation="Right")

        # Make plots of bins used in estimation
        theirs = testWindowsPlot.Clone("validateWindowRanges")
        theirs.Reset()
        for ybin in range(1, len(vec_validateWindows_center) + 1):
        #newgraph.SetPoint(np,d1/1000.0,d2/0.82) # Dividing by 0.82 to divide out efficiency NOTE
        # FIXME newgraph.SetPoint(np,d1,d2/0.82) # Dividing by 0.82 to divide out efficiency NOTE No divide by 1000, as want GeV
        newgraph.SetPoint(
            np, d1, d2
        )  # Dividing by 0.82 to divide out efficiency NOTE No divide by 1000, as want GeV
        #if d1/1000 > findMaxRange :
        #  findMaxRange = d1/1000
        if d1 > findMaxRange:
            findMaxRange = d1
    shiftedgraphs.append(newgraph)

trueMaxRange = round(findMaxRange * 2) / 2 + 100
#trueMaxRange = round(findMaxRange * 2) / 2 + 0.5
# Lydia myPainter.drawSeveralObservedLimits(shiftedgraphs,names,folderextension+"GenericGaussians"+plotextension,"m_{G} [TeV]",\
#     "#sigma #times #it{A} #times BR [pb]",luminosity,13,1,trueMaxRange,0.004,5,[])
myPainter.drawSeveralObservedLimits(shiftedgraphs,names,folderextension+"GenericGaussians"+plotextension,"m_{G} [GeV]",\
     "#sigma #times #it{A} #times BR [pb]",luminosity,13,203,trueMaxRange,1E-2,10,[])

print "For table in note:"
mostMasses = results[sorted(results.keys())[0]]
for mass in sorted(mostMasses):

    sys.stdout.write("{0}".format(int(mass)))
    sys.stdout.write(" & ")
    for width in sorted(results.keys()):
        if mass in results[width].keys():
            #sys.stdout.write('{0}'.format(round(results[width][mass]/0.82,3)))# Dividing by 0.82 to divide out efficiency NOTE
            # FIXME sys.stdout.write('{0}'.format(float('%.2g' % (results[width][mass]/0.82)))) # Dividing by 0.82 to divide out efficiency NOTE
            sys.stdout.write('{0}'.format(
                float('%.2g' % (results[width][mass]))
            ))  # Dividing by 0.82 to divide out efficiency NOTE
            #sys.stdout.write("{0}".format(results[width][mass]))
    d1, d2 = ROOT.Double(0), ROOT.Double(0)
    findMaxRange = 0
    for graph in graphs:
        newgraph = graph.Clone()
        newgraph.SetName(graph.GetName() + "_scaled")
        for np in range(newgraph.GetN()):
            newgraph.GetPoint(np, d1, d2)
            newgraph.SetPoint(np, d1 / 1000.0, d2)
            if d1 / 1000 > findMaxRange:
                findMaxRange = d1 / 1000
        shiftedgraphs.append(newgraph)

    trueMaxRange = round(findMaxRange * 2) / 2 + 0.5

    myPainter.cutstring = "|y*| < 0.6"
    myPainter.drawSeveralObservedLimits(shiftedgraphs,names,folderextension+"GenericGaussians"+plotextension,"m_{G} [TeV]",\
       "#sigma #times #it{A} #times BR [pb]",luminosity,13,0.9,7.2,1E-2,50,[],ATLASLabelLocation="BottomR",cutLocation="Left")

    print "For table in note:"
    #  mostMasses = results[sorted(results.keys())[0]]
    print results.keys()[0]
    groupMasses = []
    for key, value in results.iteritems():  #
        groupMasses = groupMasses + value.keys()
    groupMasses = list(set(groupMasses))
    print groupMasses
    mostMasses = sorted(groupMasses)
    for mass in sorted(mostMasses):

        sys.stdout.write("{0}".format(float('%.3g' % (mass / 1000.0))))
        sys.stdout.write(" & ")
        for width in sorted(results.keys()):
Beispiel #4
0
                        "Nuisance parameter [0 ,1]")
                else:
                    myPainter.drawPosteriorsWithCLs(
                        pairs, shortnames, luminosity, Ecm, outputname, 0,
                        True, False, False, False, [gaushist], False,
                        "Nuisance parameter, #sigma")

            inputfile.Close()

##################################################
# Overlay observed limits for each Z' signal
##################################################

myPainter.drawSeveralObservedLimits(
    SeveralLimitsMaterials["observed"], SeveralLimitsMaterials["legend"],
    folderextension + "MultiLimits" + plotextension,
    SignalAxes['ZPrime0p10']["X"], SignalAxes['ZPrime0p10']["Y"], luminosity,
    Ecm, 200, 1400, 1.5E-2, 1)  #yranges['ZPrime0p10'][1])

##################################################
# Signal overlay plots, 'Fancy figures' no signals
##################################################

outputName = folderextension + "FancyFigure1_NoSignals" + plotextension
myPainter.drawDataAndFitWithSignalsOverSignificances(datahist,fithist,basicSignificancePlot,residual,[],\
  [],[],[],"m_{jj} [GeV]","Events","[data-fit]/fit","Significance ",\
  outputName,luminosity,Ecm,firstBin,lastBin-1,True,bumpLowEdge,bumpHighEdge,True,False,False,"",False,-999,False,-999,-999,None,5E3,5E6)

outputName = folderextension + "FancyFigure1WithFitLabels_NoSignals" + plotextension
myPainter.drawDataAndFitWithSignalsOverSignificances(datahist,fithist,basicSignificancePlot,residual,[],\
  [],[],[],"m_{jj} [GeV]","Events","[data-fit]/fit","Significance ",\