Summary

  • Plot the fits
  • Plot the uncertainty on the signal yield

In [1]:
import sys
sys.path.append('../../FourVector')
sys.path.append('../project')

from FourVector import FourVector
from ThreeVector import ThreeVector

from FutureColliderTools import SmearVertex, GetCorrectedMass, GetMissingMass2, GetQ2
from FutureColliderDataLoader import LoadData_KMuNu, LoadData_DsMuNu
from FutureColliderVariables import *
from FutureColliderFitter import FutureFitter

import numpy as np
import ROOT

ROOT.enableJSVis()
ROOT.gStyle.SetOptStat(0)


Welcome to JupyROOT 6.08/02

Make the canvases for each plot


In [2]:
File_Fits = ROOT.TFile.Open("../output/FitterOutput.root", "READ")

Canv_Fits = {}
Canv_Fits["Ds"] = ROOT.TCanvas("c_Ds", "", 900, 900)
Canv_Fits["K"]  = ROOT.TCanvas("c_K", "", 900, 900)
Canv_Fits["Ds"].Divide(3,3)
Canv_Fits["K"] .Divide(3,3)

Legends = {}
Texts = []

for Mode in ["K", "Ds"]:
    it = 1
    for resolution in np.linspace(0.3, 1.0, 8):
        canvas = File_Fits.Get("c_Fit_{mode}_{resolution}".format(mode = Mode, resolution = resolution))
        Canv_Fits[Mode].cd(it)
        for prim in canvas.GetListOfPrimitives():
            if prim.GetName() == "TPave":
                Legends[Mode] = prim.Clone()
                canvas.GetListOfPrimitives().Remove(prim)
                break
        Text = ROOT.TPaveText(0.02, 0.8, 0.3, 0.98, "NDC")
        Text.AddText("{0} #sigma LHCb".format(resolution))
        Text.SetBorderSize(0)
        Text.SetFillColor(0)
        canvas.DrawClonePad()
        
        Text.Draw()
        Texts += [Text]
        it+=1
        
    Canv_Fits[Mode].cd(9)
    Legends[Mode].SetX1(0)
    Legends[Mode].SetX2(1)
    Legends[Mode].SetY1(0)
    Legends[Mode].SetY2(1)
    Legends[Mode].Draw()

In [3]:
Canv_Fits["Ds"].Draw()
Canv_Fits["Ds"].Print("AllFits_Ds.pdf")
Canv_Fits["Ds"].Print("AllFits_Ds.png")


Info in <TCanvas::Print>: pdf file AllFits_Ds.pdf has been created
Info in <TCanvas::Print>: png file AllFits_Ds.png has been created

In [4]:
Canv_Fits["K"].Draw()
Canv_Fits["K"].Print("AllFits_K.pdf")


Info in <TCanvas::Print>: pdf file AllFits_K.pdf has been created

Print the results of the fit


In [5]:
import pickle
Results = pickle.load( open("../output/FitResults.p") )

print "Results for K Mu Nu Fit:"
print Results["K"]
print "\nResults for Ds Mu Nu Fit:"
print Results["Ds"]


Results for K Mu Nu Fit:
+---------------------+-----------------+---------------+
| Vertex Error / LHCb | Signal Fraction |   Error [%]   |
+---------------------+-----------------+---------------+
|         0.0         |  0.13713612994  | 1.82206682967 |
|         0.1         |  0.138571440548 | 2.42634973298 |
|         0.2         |  0.143835331579 |  2.8360062468 |
|         0.3         |  0.144696651677 | 3.35291015145 |
|         0.4         |  0.14284525001  | 4.00714084851 |
|         0.5         |  0.135499941229 | 4.65954734387 |
|         0.6         |  0.13307470413  | 5.48047082965 |
|         0.7         |  0.148579755607 |  5.0495865795 |
|         0.8         |  0.148751139842 | 5.72713080733 |
|         0.9         |  0.145562345076 | 6.56092526137 |
|         1.0         |  0.162994898051 | 510.190765794 |
+---------------------+-----------------+---------------+

Results for Ds Mu Nu Fit:
+---------------------+-----------------+---------------+
| Vertex Error / LHCb | Signal Fraction |   Error [%]   |
+---------------------+-----------------+---------------+
|         0.0         |  0.28794408816  | 1.27731712978 |
|         0.1         |  0.290734992859 | 1.81817271475 |
|         0.2         |  0.287846823631 | 2.28886114014 |
|         0.3         |  0.289724203098 | 2.72024765757 |
|         0.4         |  0.287036218166 | 3.13065908051 |
|         0.5         |  0.293743448019 | 3.47768809384 |
|         0.6         |  0.27983782116  | 4.12174343735 |
|         0.7         |  0.284232799607 | 5.07872503247 |
|         0.8         |  0.299083552867 | 4.29951374217 |
|         0.9         |  0.28541963545  | 4.97762583302 |
|         1.0         |  0.278154759086 | 6.58745539174 |
+---------------------+-----------------+---------------+

In [6]:
Graph_K  = File_Fits.Get("Error_Budget_K")
Graph_Ds = File_Fits.Get("Error_Budget_Ds")

Graph_K.SetLineStyle(2)
Graph_K.SetMarkerStyle(4)

Graph_Ds.SetLineStyle(2)
Graph_Ds.SetMarkerStyle(4)

Plot the error budget for $B_s \to k^- \mu^+ \nu_{\mu}$


In [7]:
canv_Budget = ROOT.TCanvas("c_graph", "", 900, 900)
Graph_K.Draw()
canv_Budget.Draw()

canv_Budget.Print("Error_Budget_K.pdf")


Info in <TCanvas::Print>: pdf file Error_Budget_K.pdf has been created

Plot the error budget for $B_s \to D_s^- \mu^+ \nu_{\mu}$


In [8]:
canv_Budget.Clear()
Graph_Ds.Draw()
canv_Budget.Draw()

canv_Budget.Print("Error_Budget_Ds.pdf")


Info in <TCanvas::Print>: pdf file Error_Budget_Ds.pdf has been created

There are some fits which terminate early and produce some eroneous errors.

This needs to be investigated


In [ ]: