In [10]:
import rootnotes
from lib import utils
In [11]:
cfg = utils.json("configs/chib1s.json")
In [12]:
import ROOT
tuples = ROOT.TChain("ChibAlg/Chib")
tuples.Add(cfg["tuples2011"])
Out[12]:
1
In [13]:
cut = cfg["cut"]
cut["pt_ups"] = (18,30)
cut["dm"] = (0.31, 1.43)
In [14]:
from lib.chib import ChibModel
from lib import fit
In [15]:
canvas=rootnotes.default_canvas()
model = ChibModel(canvas,
                  dm_begin=cut["dm"][0],
                  dm_end=cut["dm"][1],
                  nbins=57,
                  bgorder=2,
                  frac=[0.6, 0.5, 0.5]
                  )
In [16]:
f = fit.Fit(model=model,
            tuples=tuples,
            cut=cut,
            field="dm",
            is_unbinned=False,
            nbins=57,
            has_splot=False)
In [17]:
result = f.process()
CUT expr   dm > 0.3100 && dm < 1.4300 && lv01 > 0.0000 && pt_ups > 18.0000 && pt_ups < 30.0000 && (Ups_l2tos & 2) == 2 && (Ups_l1tos & 2) == 2 && (Ups_l0tos & 2) == 2 && cl_g > 0.0100 && y > 2.0000 && y < 4.5000 && dm_1s < 0.2000 && pt_g > 1.3000 && c2_dtf > 0.0000 && c2_dtf < 4.0000 && dll_min > 0.0000
In [18]:
canvas
Out[18]: