Logo ROOT  
Reference Guide
rf204a_extendedLikelihood Namespace Reference

Variables

 a0 = ROOT.RooRealVar("a0", "a0", 0.5, 0.0, 1.0)
 a1 = ROOT.RooRealVar("a1", "a1", 0.2, 0.0, 1.0)
 bkg = ROOT.RooChebychev("bkg", "Background", x, [a0, a1])
 canv = ROOT.TCanvas("Canvas", "Canvas", 1500, 600)
 data = model.generate(x, 1000)
 frame = x.frame(Title="Full range fitted")
 frame2 = x.frame(Title="Fit in left/right sideband")
 frame3 = x.frame(Title="Fit from left to middle")
 mean = ROOT.RooRealVar("mean", "mean of gaussians", 5)
 model = ROOT.RooAddPdf("model", "(g1+g2)+a", [bkg, sig], [nbkg, nsig])
 model1 = ROOT.RooAddPdf(model)
 model2 = ROOT.RooAddPdf(model)
 model3 = ROOT.RooAddPdf(model)
 nbkg = ROOT.RooRealVar("nbkg", "number of background events in signalRange", 500, 0, 10000)
 nsig = ROOT.RooRealVar("nsig", "number of signal events in signalRange", 500, 0.0, 10000)
 r = model1.fitTo(data, Save=True, PrintLevel=-1)
 r2 = model2.fitTo(data, Range="left,right", Save=True, PrintLevel=-1)
 r3 = model3.fitTo(data, Range="leftToMiddle", Save=True, PrintLevel=-1)
 sig = ROOT.RooAddPdf("sig", "Signal", [sig1, sig2], sig1frac)
 sig1 = ROOT.RooGaussian("sig1", "Signal component 1", x, mean, sigma1)
 sig1frac = ROOT.RooRealVar("sig1frac", "fraction of component 1 in signal", 0.8, 0.0, 1.0)
 sig2 = ROOT.RooGaussian("sig2", "Signal component 2", x, mean, sigma2)
 sigma1 = ROOT.RooRealVar("sigma1", "width of gaussians", 0.5)
 sigma2 = ROOT.RooRealVar("sigma2", "width of gaussians", 1)
 VisualizeError
 x = ROOT.RooRealVar("x", "x", 0, 11)

Variable Documentation

◆ a0

rf204a_extendedLikelihood.a0 = ROOT.RooRealVar("a0", "a0", 0.5, 0.0, 1.0)

Definition at line 30 of file rf204a_extendedLikelihood.py.

◆ a1

rf204a_extendedLikelihood.a1 = ROOT.RooRealVar("a1", "a1", 0.2, 0.0, 1.0)

Definition at line 31 of file rf204a_extendedLikelihood.py.

◆ bkg

rf204a_extendedLikelihood.bkg = ROOT.RooChebychev("bkg", "Background", x, [a0, a1])

Definition at line 32 of file rf204a_extendedLikelihood.py.

◆ canv

rf204a_extendedLikelihood.canv = ROOT.TCanvas("Canvas", "Canvas", 1500, 600)

Definition at line 58 of file rf204a_extendedLikelihood.py.

◆ data

rf204a_extendedLikelihood.data = model.generate(x, 1000)

Definition at line 56 of file rf204a_extendedLikelihood.py.

◆ frame

rf204a_extendedLikelihood.frame = x.frame(Title="Full range fitted")

Definition at line 76 of file rf204a_extendedLikelihood.py.

◆ frame2

rf204a_extendedLikelihood.frame2 = x.frame(Title="Fit in left/right sideband")

Definition at line 95 of file rf204a_extendedLikelihood.py.

◆ frame3

rf204a_extendedLikelihood.frame3 = x.frame(Title="Fit from left to middle")

Definition at line 115 of file rf204a_extendedLikelihood.py.

◆ mean

rf204a_extendedLikelihood.mean = ROOT.RooRealVar("mean", "mean of gaussians", 5)

Definition at line 22 of file rf204a_extendedLikelihood.py.

◆ model

rf204a_extendedLikelihood.model = ROOT.RooAddPdf("model", "(g1+g2)+a", [bkg, sig], [nbkg, nsig])

Definition at line 50 of file rf204a_extendedLikelihood.py.

◆ model1

rf204a_extendedLikelihood.model1 = ROOT.RooAddPdf(model)

Definition at line 72 of file rf204a_extendedLikelihood.py.

◆ model2

rf204a_extendedLikelihood.model2 = ROOT.RooAddPdf(model)

Definition at line 91 of file rf204a_extendedLikelihood.py.

◆ model3

rf204a_extendedLikelihood.model3 = ROOT.RooAddPdf(model)

Definition at line 111 of file rf204a_extendedLikelihood.py.

◆ nbkg

rf204a_extendedLikelihood.nbkg = ROOT.RooRealVar("nbkg", "number of background events in signalRange", 500, 0, 10000)

Definition at line 47 of file rf204a_extendedLikelihood.py.

◆ nsig

rf204a_extendedLikelihood.nsig = ROOT.RooRealVar("nsig", "number of signal events in signalRange", 500, 0.0, 10000)

Definition at line 46 of file rf204a_extendedLikelihood.py.

◆ r

rf204a_extendedLikelihood.r = model1.fitTo(data, Save=True, PrintLevel=-1)

Definition at line 73 of file rf204a_extendedLikelihood.py.

◆ r2

rf204a_extendedLikelihood.r2 = model2.fitTo(data, Range="left,right", Save=True, PrintLevel=-1)

Definition at line 92 of file rf204a_extendedLikelihood.py.

◆ r3

rf204a_extendedLikelihood.r3 = model3.fitTo(data, Range="leftToMiddle", Save=True, PrintLevel=-1)

Definition at line 112 of file rf204a_extendedLikelihood.py.

◆ sig

rf204a_extendedLikelihood.sig = ROOT.RooAddPdf("sig", "Signal", [sig1, sig2], sig1frac)

Definition at line 36 of file rf204a_extendedLikelihood.py.

◆ sig1

rf204a_extendedLikelihood.sig1 = ROOT.RooGaussian("sig1", "Signal component 1", x, mean, sigma1)

Definition at line 26 of file rf204a_extendedLikelihood.py.

◆ sig1frac

rf204a_extendedLikelihood.sig1frac = ROOT.RooRealVar("sig1frac", "fraction of component 1 in signal", 0.8, 0.0, 1.0)

Definition at line 35 of file rf204a_extendedLikelihood.py.

◆ sig2

rf204a_extendedLikelihood.sig2 = ROOT.RooGaussian("sig2", "Signal component 2", x, mean, sigma2)

Definition at line 27 of file rf204a_extendedLikelihood.py.

◆ sigma1

rf204a_extendedLikelihood.sigma1 = ROOT.RooRealVar("sigma1", "width of gaussians", 0.5)

Definition at line 23 of file rf204a_extendedLikelihood.py.

◆ sigma2

rf204a_extendedLikelihood.sigma2 = ROOT.RooRealVar("sigma2", "width of gaussians", 1)

Definition at line 24 of file rf204a_extendedLikelihood.py.

◆ VisualizeError

rf204a_extendedLikelihood.VisualizeError

Definition at line 78 of file rf204a_extendedLikelihood.py.

◆ x

rf204a_extendedLikelihood.x = ROOT.RooRealVar("x", "x", 0, 11)

Definition at line 19 of file rf204a_extendedLikelihood.py.