7@ROOT.Numba.Declare(["int", "int", "RVecI"], "bool")
9 return nhitrp[ik - 1] * nhitrp[ipi - 1] > 1
12@ROOT.Numba.Declare(["int", "RVecF", "RVecF"], "bool")
14 return rend[ik - 1] - rstart[ik - 1] > 22
17@ROOT.Numba.Declare(["int", "RVecF", "RVecF"], "bool")
19 return rend[ipi - 1] - rstart[ipi - 1] > 22
22@ROOT.Numba.Declare(["int", "RVecF"], "bool")
24 return nlhk[ik - 1] > 0.1
27@ROOT.Numba.Declare(["int", "RVecF"], "bool")
29 return nlhpi[ipi - 1] > 0.1
32@ROOT.Numba.Declare(["int", "RVecF"], "bool")
34 return nlhpi[ipis - 1] > 0.1
39 rdf.Filter(
"TMath::Abs(md0_d - 1.8646) < 0.04")
40 .Filter(
"ptds_d > 2.5")
41 .Filter(
"TMath::Abs(etads_d) < 1.5")
42 .Filter(
"Numba::ik_ipi_nhitrp_cut(ik, ipi, nhitrp)")
43 .Filter(
"Numba::ik_rstart_rend_cut(ik, rstart, rend)")
44 .Filter(
"Numba::ipi_rstart_rend_cut(ipi, rstart, rend)")
45 .Filter(
"Numba::ik_nlhk_cut(ik, nlhk)")
46 .Filter(
"Numba::ipi_nlhpi_cut(ipi, nlhpi)")
47 .Filter(
"Numba::ipis_nlhpi_cut(ipis, nlhpi)")
51dxbin = (0.17 - 0.13) / 40
52condition =
"x > 0.13957"
53xp3 =
"(x - [3]) * (x - [3])"
57 ROOT.gStyle.SetOptFit()
58 c1 = ROOT.TCanvas(
"c1",
"h1analysis analysis", 10, 10, 800, 600)
60 hdmd.GetXaxis().SetTitleOffset(1.4)
62 hdraw = hdmd.DrawClone()
65 formula = f
"{dxbin} * ([0] * pow(x - 0.13957, [1]) + [2] / 2.5066 / [4] * exp(-{xp3} / 2 / [4] / [4]))"
66 f5 = ROOT.TF1(
"f5", f
"{condition} ? {formula} : 0", 0.139, 0.17, 5)
67 f5.SetParameters(1000000, 0.25, 2000, 0.1454, 0.001)
77 c2 = ROOT.TCanvas(
"c2",
"tauD0", 100, 100, 800, 600)
80 c2.SetBottomMargin(0.15)
87 formula = f
"{dxbin} * ([0] * pow(x - 0.13957, 0.25) + [1] / 2.5066 / {sigma} * exp(-{xp3} / 2 / {sigma} / {sigma}))"
88 print(f
"TWO: {condition} ? {formula} : 0")
90 f2 = ROOT.TF1(
"f2", f
"{condition} ? {formula} : 0", 0.139, 0.17, 2)
91 f2.SetParameters(10000, 10)
92 h2.FitSlicesX(f2, 0, -1, 1,
"qln")
95 h2_1 = ROOT.gDirectory.Get(
"h2_1")
96 h2_1.SetDirectory(ROOT.nullptr)
97 h2_1.GetXaxis().SetTitle(
"#tau [ps]")
98 h2_1.SetMarkerStyle(21)
103 line = ROOT.TLine(0, 0, 0, c2.GetUymax())
109chain = ROOT.TChain(
"h42")
110chain.Add(
"root://eospublic.cern.ch//eos/root-eos/h1/dstarmb.root")
111chain.Add(
"root://eospublic.cern.ch//eos/root-eos/h1/dstarp1a.root")
112chain.Add(
"root://eospublic.cern.ch//eos/root-eos/h1/dstarp1b.root")
113chain.Add(
"root://eospublic.cern.ch//eos/root-eos/h1/dstarp2.root")
118hdmdARP = selected.Histo1D((
"hdmd",
"Dm_d;m_{K#pi#pi} - m_{K#pi}[GeV/c^{2}]", 40, 0.13, 0.17),
"dm_d")
119selected_added_branch = selected.Define(
"h2_y",
"rpd0_t / 0.029979f * 1.8646f / ptd0_d")
120h2ARP = selected_added_branch.Histo2D((
"h2",
"ptD0 vs Dm_d", 30, 0.135, 0.165, 30, -3, 6),
"dm_d",
"h2_y")
122FitAndPlotHdmd(hdmdARP)
ROOT's RDataFrame offers a modern, high-level interface for analysis of data stored in TTree ,...
void EnableImplicitMT(UInt_t numthreads=0)
Enable ROOT's implicit multi-threading for all objects and methods that provide an internal paralleli...
ipi_nlhpi_cut(ipi, nlhpi)
ipis_nlhpi_cut(ipis, nlhpi)
ipi_rstart_rend_cut(ipi, rstart, rend)
ik_ipi_nhitrp_cut(ik, ipi, nhitrp)
FitAndPlotHdmd(ROOT.TH1 hdmd)
ik_rstart_rend_cut(ik, rstart, rend)
FitAndPlotH2(ROOT.TH2 h2)