Пример #1
0
def countingMuTMuWArrowsAtMuHat( opts ):
	modelSuffix = ''
	if 'interpCode0' in opts: modelSuffix = '_interpCode0'

	arrows = []
	for c in ['2ph','4l','lvlv']:
		try:
			with open("output/atlas_counting/"+c+modelSuffix+"/table_etas.pickle", "rb") as f:
				etasAll = pickle.load( f )
				muHat = {
					'muT':etasAll['generic20_learning'].values()[0]['muT__hat'],
					'muW':etasAll['generic20_learning'].values()[0]['muW__hat'],
				}
				arrows = etas.drawArrows( 'fisherInfo', etasAll['fisherInfo'], muHat, lineWidth=2.0 )
				container.append(arrows)
				label = PyROOTUtils.DrawText( muHat['muT'], muHat['muW'], {
					'2ph':'H#rightarrow#gamma#gamma  ',
					'4l':'H#rightarrowZZ*#rightarrow4l  ',
					'lvlv':'H#rightarrowWW*#rightarrowl#nul#nu  ',
				}[c], textSize=0.03, halign="right", valign="top", NDC=False )
				container.append(label)
		except IOError:
			print( "WARNING: Could not open:" )
			print( "output/atlas_counting/"+c+modelSuffix+"/table_etas.pickle" )
		except:
			print( "ERROR!!!!!!!!!!!!" )
			
	leg = PyROOTUtils.Legend( 0.2,0.9, textSize=0.03 )
	for a,p in arrows: leg.AddEntry( a, p.replace("alpha_",""), "L" )
	leg.Draw()
Пример #2
0
def countingMuTMuWArrowsAtMuHat(opts):
    modelSuffix = ''
    if 'interpCode0' in opts: modelSuffix = '_interpCode0'

    arrows = []
    for c in ['2ph', '4l', 'lvlv']:
        try:
            with open(
                    "output/atlas_counting/" + c + modelSuffix +
                    "/table_etas.pickle", "rb") as f:
                etasAll = pickle.load(f)
                muHat = {
                    'muT':
                    etasAll['generic20_learning'].values()[0]['muT__hat'],
                    'muW':
                    etasAll['generic20_learning'].values()[0]['muW__hat'],
                }
                arrows = etas.drawArrows('fisherInfo',
                                         etasAll['fisherInfo'],
                                         muHat,
                                         lineWidth=2.0)
                container.append(arrows)
                label = PyROOTUtils.DrawText(
                    muHat['muT'],
                    muHat['muW'],
                    {
                        '2ph': 'H#rightarrow#gamma#gamma  ',
                        '4l': 'H#rightarrowZZ*#rightarrow4l  ',
                        'lvlv': 'H#rightarrowWW*#rightarrowl#nul#nu  ',
                    }[c],
                    textSize=0.03,
                    halign="right",
                    valign="top",
                    NDC=False)
                container.append(label)
        except IOError:
            print("WARNING: Could not open:")
            print("output/atlas_counting/" + c + modelSuffix +
                  "/table_etas.pickle")
        except:
            print("ERROR!!!!!!!!!!!!")

    leg = PyROOTUtils.Legend(0.2, 0.9, textSize=0.03)
    for a, p in arrows:
        leg.AddEntry(a, p.replace("alpha_", ""), "L")
    leg.Draw()
Пример #3
0
def countingMuTMuWShifted( opts ):
	modelSuffix = ''
	if 'interpCode0' in opts: modelSuffix = '_interpCode0'

	drawMarker = True
	if 'etaArrows' in opts: drawMarker = False
	c68_2ph_f = drawContours( "output/atlas_counting/2ph"+modelSuffix+"/muTmuW_eff_"+opts['model']+"_0.0.root", "muTmuW", color = ROOT.kRed-3, drawSmallestBinMarker=drawMarker )
	c68_4l_f = drawContours( "output/atlas_counting/4l"+modelSuffix+"/muTmuW_eff_"+opts['model']+"_0.0.root", "muTmuW", color = ROOT.kBlue, drawSmallestBinMarker=drawMarker )
	c68_lvlv_f = drawContours( "output/atlas_counting/lvlv"+modelSuffix+"/muTmuW_eff_"+opts['model']+"_0.0.root", "muTmuW", color = ROOT.kGreen-2, drawSmallestBinMarker=drawMarker )

	c68_2ph_s = drawContours( "output/atlas_counting/2ph"+modelSuffix+"/muTmuW_eff_"+opts['model']+"_1.0.root", "muTmuW", color = ROOT.kRed-3, lineStyle=ROOT.kDashed, drawSmallestBinMarker=drawMarker )
	c68_4l_s = drawContours( "output/atlas_counting/4l"+modelSuffix+"/muTmuW_eff_"+opts['model']+"_1.0.root", "muTmuW", color = ROOT.kBlue, lineStyle=ROOT.kDashed, drawSmallestBinMarker=drawMarker )
	c68_lvlv_s = drawContours( "output/atlas_counting/lvlv"+modelSuffix+"/muTmuW_eff_"+opts['model']+"_1.0.root", "muTmuW", color = ROOT.kGreen-2, lineStyle=ROOT.kDashed, drawSmallestBinMarker=drawMarker )

	if 'etaArrows' in opts:
		arrows = []
		for c in ['2ph','4l','lvlv']:
			try:
				with open("output/atlas_counting/"+c+modelSuffix+"/table_etas.pickle", "rb") as f:
					etasAll = pickle.load( f )
					muHat = {
						'muT':etasAll['generic20_learning'].values()[0]['muT__hat'],
						'muW':etasAll['generic20_learning'].values()[0]['muW__hat'],
					}
					arrows = etas.drawArrows( etasAll['fisherInfo'], muHat, lineWidth=1.0, template=0 )
					container.append(arrows)
			except IOError:
				print( "WARNING: Could not open:" )
				print( "output/atlas_counting/"+c+modelSuffix+"/table_etas.pickle" )
			except:
				print( "ERROR!!!!!!!!!!")
		leg = PyROOTUtils.Legend( 0.64,0.78, textSize=0.025 )
		for a,p in arrows: leg.AddEntry( a, parameterNames[p.replace("alpha_","")], "L" )
		leg.Draw()

	leg = PyROOTUtils.Legend( 0.2, 0.30, textSize=0.025 )
	leg.AddEntry( SMMarker, "Standard Model", "P" )
	leg.AddEntry( blackSolid, "68% CL with #alpha at nominal", "L" )
	leg.AddEntry( blackDashed, "68% CL with #alpha at +1 #sigma", "L" )
	leg.Draw()
	
	leg2 = PyROOTUtils.Legend( 0.64, 0.90, textSize = 0.025 )
	if c68_2ph_f:  leg2.AddEntry( c68_2ph_f[0],  "H #rightarrow #gamma#gamma", "L" )
	if c68_4l_f:   leg2.AddEntry( c68_4l_f[0],   "H #rightarrow ZZ* #rightarrow 4l", "L" )
	if c68_lvlv_f: leg2.AddEntry( c68_lvlv_f[0], "H #rightarrow WW* #rightarrow l#nul#nu", "L" )
	leg2.Draw()
Пример #4
0
def countingMuTMuWShifted(opts):
    modelSuffix = ''
    if 'interpCode0' in opts: modelSuffix = '_interpCode0'

    drawMarker = True
    if 'etaArrows' in opts: drawMarker = False
    c68_2ph_f = drawContours("output/atlas_counting/2ph" + modelSuffix +
                             "/muTmuW_eff_" + opts['model'] + "_0.0.root",
                             "muTmuW",
                             color=ROOT.kRed - 3,
                             drawSmallestBinMarker=drawMarker)
    c68_4l_f = drawContours("output/atlas_counting/4l" + modelSuffix +
                            "/muTmuW_eff_" + opts['model'] + "_0.0.root",
                            "muTmuW",
                            color=ROOT.kBlue,
                            drawSmallestBinMarker=drawMarker)
    c68_lvlv_f = drawContours("output/atlas_counting/lvlv" + modelSuffix +
                              "/muTmuW_eff_" + opts['model'] + "_0.0.root",
                              "muTmuW",
                              color=ROOT.kGreen - 2,
                              drawSmallestBinMarker=drawMarker)

    c68_2ph_s = drawContours("output/atlas_counting/2ph" + modelSuffix +
                             "/muTmuW_eff_" + opts['model'] + "_1.0.root",
                             "muTmuW",
                             color=ROOT.kRed - 3,
                             lineStyle=ROOT.kDashed,
                             drawSmallestBinMarker=drawMarker)
    c68_4l_s = drawContours("output/atlas_counting/4l" + modelSuffix +
                            "/muTmuW_eff_" + opts['model'] + "_1.0.root",
                            "muTmuW",
                            color=ROOT.kBlue,
                            lineStyle=ROOT.kDashed,
                            drawSmallestBinMarker=drawMarker)
    c68_lvlv_s = drawContours("output/atlas_counting/lvlv" + modelSuffix +
                              "/muTmuW_eff_" + opts['model'] + "_1.0.root",
                              "muTmuW",
                              color=ROOT.kGreen - 2,
                              lineStyle=ROOT.kDashed,
                              drawSmallestBinMarker=drawMarker)

    if 'etaArrows' in opts:
        arrows = []
        for c in ['2ph', '4l', 'lvlv']:
            try:
                with open(
                        "output/atlas_counting/" + c + modelSuffix +
                        "/table_etas.pickle", "rb") as f:
                    etasAll = pickle.load(f)
                    muHat = {
                        'muT':
                        etasAll['generic20_learning'].values()[0]['muT__hat'],
                        'muW':
                        etasAll['generic20_learning'].values()[0]['muW__hat'],
                    }
                    arrows = etas.drawArrows(etasAll['fisherInfo'],
                                             muHat,
                                             lineWidth=1.0,
                                             template=0)
                    container.append(arrows)
            except IOError:
                print("WARNING: Could not open:")
                print("output/atlas_counting/" + c + modelSuffix +
                      "/table_etas.pickle")
            except:
                print("ERROR!!!!!!!!!!")
        leg = PyROOTUtils.Legend(0.64, 0.78, textSize=0.025)
        for a, p in arrows:
            leg.AddEntry(a, parameterNames[p.replace("alpha_", "")], "L")
        leg.Draw()

    leg = PyROOTUtils.Legend(0.2, 0.30, textSize=0.025)
    leg.AddEntry(SMMarker, "Standard Model", "P")
    leg.AddEntry(blackSolid, "68% CL with #alpha at nominal", "L")
    leg.AddEntry(blackDashed, "68% CL with #alpha at +1 #sigma", "L")
    leg.Draw()

    leg2 = PyROOTUtils.Legend(0.64, 0.90, textSize=0.025)
    if c68_2ph_f:
        leg2.AddEntry(c68_2ph_f[0], "H #rightarrow #gamma#gamma", "L")
    if c68_4l_f:
        leg2.AddEntry(c68_4l_f[0], "H #rightarrow ZZ* #rightarrow 4l", "L")
    if c68_lvlv_f:
        leg2.AddEntry(c68_lvlv_f[0], "H #rightarrow WW* #rightarrow l#nul#nu",
                      "L")
    leg2.Draw()