'ADDITION AND CONVOLUTION' RooFit tutorial macro #201
Composite p.d.f with signal and background component
pdf = f_bkg * bkg(x,a0,a1) + (1-fbkg) * (f_sig1 * sig1(x,m,s1 + (1-f_sig1) * sig2(x,m,s2)))
#ifndef __CINT__
#endif
using namespace RooFit ;
void rf201_composite()
{
RooRealVar sigma1(
"sigma1",
"width of gaussians",0.5) ;
RooRealVar sigma2(
"sigma2",
"width of gaussians",1) ;
RooRealVar sig1frac(
"sig1frac",
"fraction of component 1 in signal",0.8,0.,1.) ;
RooRealVar bkgfrac(
"bkgfrac",
"fraction of background",0.5,0.,1.) ;
model.fitTo(*data) ;
RooPlot* xframe =
x.frame(
Title(
"Example of composite pdf=(sig1+sig2)+bkg")) ;
model.plotOn(xframe) ;
model2.Print("t") ;
new TCanvas("rf201_composite","rf201_composite",600,600) ;
}
- Author
- 07/2008 - Wouter Verkerke
Definition in file rf201_composite.C.