Download presentation
Presentation is loading. Please wait.
Published byGeorgia Waters Modified over 9 years ago
1
RooFit – tools for ML fits Authors: Wouter Verkerke and David Kirkby
2
-there was always a gap between common tools for handling “binned” data samples (Paw, Mn_Fit, Root..) and tools for doing more complicated unbinned ML analysis for arbitrary number of variables, -few years ago David and Wouter wrote a prototype for BaBar(RooFitTools), and many groups jumped on it, used it, and gave feedback to authors(good and bad..), -based on all the feedback, authors decided to re-write the package from scratch, and call it RooFit -since then, all the most complicated CP-fitting analyses in BaBar were done with this package, which became essentially a standard (~40 variables, per-event-errors, realistic resolution functions,~20-50 signal/background categories ) Some history
3
-source code, help, tutorials are available from the open- source server: http://roofit.sourceforge.nethttp://roofit.sourceforge.net -code was compiled/tested on various flavors of Linux and Unix, -it took few minor changes in the Makefiles to install it on BNL “acas” Linux farm: ~vasia/RooFit-V01-00-03 -works “out of the box” for many simple tasks, but can be easily customized for each specific analysis, in fact most of the analyses in BaBar have their own RooFit- based package which archived in CVS ( helps each time you need to go back and re-check stuff ), Documentation
4
RooRealVar x("x","x",0.0,0, 10.0); RooRealVar mean ("mean","mean", 6.5,0,10); RooRealVar sigma("sigma","sigma",0.4,0,10); RooRealVar nsig("nsig","nsig",90,-10,1000); RooGaussian g("g","Generation Pdf",x,mean,sigma); RooRealVar argpar ("argpar", “Argus shape paramerter",-1.0,-10,10); RooRealVar cutoff ("cutoff", “Argus cutoff",10.0,0,20); RooArgusBG a ("a", "Argus PDF", x, cutoff, argpar); RooRealVar nbkg("nbkg","nbkg",210,-10,1000); RooAddPdf fit ("fit", "g+a", RooArgList(g, a), RooArgList(nsig, nbkg)); RooDataSet *data = fit.generate(x,300); RooPlot* xframe = x.frame(); data->plotOn(xframe); fit->plotOn(xframe); fit->plotOn(xframe,Components(RooArgSet(ge,a))); xframe->Draw(); Example 1(code)
5
Example 1(results)
6
RooMCStudy toymc ("fit", fit, “x”, “evh” ); 1000,300 toymc.generateAndFit(1000,300); Example 2(toy studies) RooPlot* xfr = nsig.frame(20,160,25); // 4 - plots toymc.plotParamOn(xfr); RooPlot* exfr = toymc.plotError(nsig,0,30,25); RooPlot* pxfr = toymc.plotPull(nsig,-5,5,25); RooPlot* xll = toymc.plotNLL(-1200,-500,50); ~30 min on 1 “acas” box
7
1000 “toy MC experiments”
8
-please try RooFit for yourself ( notice, PDF normalization is taken away from the user and handled by the package.. ), -there are few hundreds slides of tutorials, and full class references, - a lot of very useful features(e.g. mix of data and Toy MC..) -a lot of “tricks” vent into optimization (e.g. for PDF normalization analytical solutions are used for simple functions, for more complicated integrals, numerical integration is done and look-up tables are generated, “lazy” recalculations, ) Conclusion
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.