'ADDITION AND CONVOLUTION' RooFit tutorial macro #204
Extended maximum likelihood fit with alternate range definition for observed number of events.
Processing /mnt/build/workspace/root-makedoc-v608/rootspi/rdoc/src/v6-08-00-patches/tutorials/roofit/rf204_extrangefit.C...
void rf204_extrangefit()
{
RooRealVar sigma1(
"sigma1",
"width of gaussians",0.5) ;
RooRealVar sigma2(
"sigma2",
"width of gaussians",1) ;
RooGaussian sig1(
"sig1",
"Signal component 1",x,mean,sigma1) ;
RooGaussian sig2(
"sig2",
"Signal component 2",x,mean,sigma2) ;
RooRealVar sig1frac(
"sig1frac",
"fraction of component 1 in signal",0.8,0.,1.) ;
x.setRange("signalRange",4,6) ;
RooRealVar nsig(
"nsig",
"number of signal events in signalRange",500,0.,10000) ;
RooRealVar nbkg(
"nbkg",
"number of background events in signalRange",500,0,10000) ;
RooExtendPdf esig(
"esig",
"extended signal p.d.f",sig,nsig,
"signalRange") ;
RooExtendPdf ebkg(
"ebkg",
"extended background p.d.f",bkg,nbkg,
"signalRange") ;
}
- Author
- 07/2008 - Wouter Verkerke
Definition in file rf204_extrangefit.C.