import ROOT
sig1frac =
ROOT.RooRealVar(
"sig1frac",
"fraction of component 1 in signal", 0.8, 0.0, 1.0)
bkg1frac =
ROOT.RooRealVar(
"bkg1frac",
"fraction of component 1 in background", 0.8, 0.0, 1.0)
bkg =
ROOT.RooAddPdf(
"bkg",
"Total background", [bkg1, bkg2], [bkg1frac])
bkgfrac =
ROOT.RooRealVar(
"bkgfrac",
"fraction of background", 0.5, 0.0, 1.0)
xframe =
x.frame(Title=
"Component plotting of pdf=(sig1+sig2)+(bkg1+bkg2)")
ras_bkg = {bkg}
ras_bkg2 = {bkg2}
model.plotOn(xframe, Components=ras_bkg2, LineStyle=
"--", LineColor=
"r")
ras_bkg_sig2 = {bkg, sig2}
model.plotOn(xframe, Components=ras_bkg_sig2, LineStyle=
":")
model.plotOn(xframe2, Components=
"bkg1,sig2", LineStyle=
":", LineColor=
"c")
model.plotOn(xframe2, Components=
"sig*", LineStyle=
"--", LineColor=
"c")
model.plotOn(xframe2, Invisible=
True, Components=
"bkg1,sig*", LineStyle=
"--", LineColor=
"y")
c =
ROOT.TCanvas(
"rf205_compplot",
"rf205_compplot", 800, 400)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
[#0] WARNING:InputArguments -- The parameter 'sigma1' with range [-inf, inf] of the RooGaussian 'sig1' exceeds the safe range of (0, inf). Advise to limit its range.
[#0] WARNING:InputArguments -- The parameter 'sigma2' with range [-inf, inf] of the RooGaussian 'sig2' exceeds the safe range of (0, inf). Advise to limit its range.
[#1] INFO:Plotting -- RooAbsPdf::plotOn(model) directly selected PDF components: (bkg)
[#1] INFO:Plotting -- RooAbsPdf::plotOn(model) indirectly selected PDF components: (bkg1,bkg2)
[#1] INFO:Plotting -- RooAbsPdf::plotOn(model) directly selected PDF components: (bkg2)
[#1] INFO:Plotting -- RooAbsPdf::plotOn(model) indirectly selected PDF components: (bkg)
[#1] INFO:Plotting -- RooAbsPdf::plotOn(model) directly selected PDF components: (bkg,sig2)
[#1] INFO:Plotting -- RooAbsPdf::plotOn(model) indirectly selected PDF components: (bkg1,bkg2,sig)
[#1] INFO:Plotting -- RooAbsPdf::plotOn(model) directly selected PDF components: (bkg)
[#1] INFO:Plotting -- RooAbsPdf::plotOn(model) indirectly selected PDF components: (bkg1,bkg2)
[#1] INFO:Plotting -- RooAbsPdf::plotOn(model) directly selected PDF components: (bkg1,sig2)
[#1] INFO:Plotting -- RooAbsPdf::plotOn(model) indirectly selected PDF components: (bkg,sig)
[#1] INFO:Plotting -- RooAbsPdf::plotOn(model) directly selected PDF components: (sig,sig1,sig2)
[#1] INFO:Plotting -- RooAbsPdf::plotOn(model) indirectly selected PDF components: ()
[#1] INFO:Plotting -- RooAbsPdf::plotOn(model) directly selected PDF components: (bkg1,sig,sig1,sig2)
[#1] INFO:Plotting -- RooAbsPdf::plotOn(model) indirectly selected PDF components: (bkg)