'ORGANIZATION AND SIMULTANEOUS FITS' RooFit tutorial macro #501
Using simultaneous p.d.f.s to describe simultaneous fits to multiple datasets
Processing /mnt/build/workspace/root-makedoc-v610/rootspi/rdoc/src/v6-10-00-patches/tutorials/roofit/rf501_simultaneouspdf.C...
void rf501_simultaneouspdf()
{
RooRealVar mean_ctl(
"mean_ctl",
"mean_ctl",-3,-8,8) ;
RooGaussian gx_ctl(
"gx_ctl",
"gx_ctl",x,mean_ctl,sigma) ;
sample.defineType("physics") ;
sample.defineType("control") ;
simPdf.addPdf(model,"physics") ;
simPdf.addPdf(model_ctl,"control") ;
simPdf.fitTo(combData) ;
combData.plotOn(frame1,
Cut(
"sample==sample::physics")) ;
simPdf.plotOn(frame1,
Slice(sample,
"physics"),
ProjWData(sample,combData)) ;
combData.plotOn(frame2,
Cut(
"sample==sample::control")) ;
simPdf.plotOn(frame2,
Slice(sample,
"control"),
ProjWData(sample,combData)) ;
TCanvas* c =
new TCanvas(
"rf501_simultaneouspdf",
"rf403_simultaneouspdf",800,400) ;
}
- Author
- 07/2008 - Wouter Verkerke
Definition in file rf501_simultaneouspdf.C.