'BASIC FUNCTIONALITY' RooFit tutorial macro #104
The class factory for functions and p.d.f.s
NOTE: This demo uses code that is generated by the macro, therefore it cannot be compiled in one step by ACliC. To run this macro compiled with ACliC do
root>.x rf104_classfactory.C
root>.L MyPdfV3.cxx+
root>.x rf104_classfactory.C+
Processing /mnt/build/workspace/root-makedoc-v608/rootspi/rdoc/src/v6-08-00-patches/tutorials/roofit/rf104_classfactory.C...
void rf104_classfactory()
{
"x:(A/2)*(pow(x.max(rangeName),2)+pow(x.min(rangeName),2))+(1./3)*(pow(x.max(rangeName)-B,3)-pow(x.min(rangeName)-B,3))") ;
gROOT->ProcessLineSync(
".x MyPdfV3.cxx+") ;
MyPdfV3 pdf("pdf","pdf",y,a,b) ;
RooPlot* frame1 = y.frame(
Title(
"Compiled class MyPdfV3")) ;
pdf.fitTo(*data) ;
pdf.plotOn(frame1) ;
RooPlot* frame2 = x.frame(
Title(
"Compiled version of pdf of rf103")) ;
TCanvas* c =
new TCanvas(
"rf104_classfactory",
"rf104_classfactory",800,400) ;
}
- Author
- 07/2008 - Wouter Verkerke
Definition in file rf104_classfactory.C.