ROOT 6.17/01 Reference Guide |

These tutorials illustrate the main features of RooFit: the name of the examples and their short description help in figuring out their objective.

## Files | |

file | rf101_basics.C |

Basic functionality: fitting, plotting, toy data generation on one-dimensional p.d.f | |

file | rf101_basics.py |

This tutorial illustrates the basic features of RooFit. | |

file | rf102_dataimport.C |

Basic functionality: importing data from ROOT TTrees and THx histograms | |

file | rf103_interprfuncs.C |

Basic functionality: interpreted functions and p.d.f.s | |

file | rf103_interprfuncs.py |

Basic functionality: interpreted functions and p.d.f.s | |

file | rf104_classfactory.C |

Basic functionality: The class factory for functions and p.d.f.s | |

file | rf104_classfactory.py |

Basic functionality: the class factory for functions and p.d.f.s | |

file | rf105_funcbinding.C |

Basic functionality: binding ROOT math functions as RooFit functions and pdfs | |

file | rf106_plotdecoration.C |

Basic functionality: adding boxes with parameters, statistics to RooPlots, decorating with arrows, text etc... | |

file | rf106_plotdecoration.py |

Basic functionality: adding boxes with parameters to RooPlots and decorating with arrows, etc... | |

file | rf107_plotstyles.C |

Basic functionality: various plotting styles of data, functions in a RooPlot | |

file | rf107_plotstyles.py |

Basic functionality: demonstration of various plotting styles of data, functions in a RooPlot | |

file | rf108_plotbinning.C |

Basic functionality: plotting unbinned data with alternate and variable binnings | |

file | rf108_plotbinning.py |

Basic functionality: plotting unbinned data with alternate and variable binnings | |

file | rf109_chi2residpull.C |

Basic functionality: Calculating chi^2 from histograms and curves in RooPlots, making histogram of residual and pull distributions | |

file | rf110_normintegration.C |

Basic functionality: normalization and integration of p.d.fs, construction of cumulative distribution monodimensional functions | |

file | rf110_normintegration.py |

Basic functionality: examples on normalization and integration of p.d.fs, construction of cumulative distribution functions from monodimensional p.d.f.s | |

file | rf111_derivatives.C |

Basic functionality: numerical 1st,2nd and 3rd order derivatives w.r.t. | |

file | rf111_derivatives.py |

Basic functionality: numerical 1st, and 3rd order derivatives w.r.t. | |

file | rf201_composite.C |

Addition and convolution: composite p.d.f with signal and background component | |

file | rf201_composite.py |

Addition and convolution: composite p.d.f with signal and background component | |

file | rf202_extendedmlfit.C |

Addition and convolution: setting up an extended maximum likelihood fit | |

file | rf202_extendedmlfit.py |

Addition and convolution: setting up an extended maximum likelihood fit | |

file | rf203_ranges.C |

Addition and convolution: fitting and plotting in sub ranges | |

file | rf203_ranges.py |

Addition and convolution: fitting and plotting in sub ranges | |

file | rf204_extrangefit.C |

'ADDITION AND CONVOLUTION' RooFit tutorial macro #204 | |

file | rf204_extrangefit.py |

Addition and convolution: extended maximum likelihood fit with alternate range definition for observed number of events. | |

file | rf204a_extrangefit_RooAddPdf.C |

'ADDITION AND CONVOLUTION' RooFit tutorial macro #204a | |

file | rf205_compplot.C |

Addition and convolution: options for plotting components of composite p.d.f.s. | |

file | rf205_compplot.py |

Addition and convolution: options for plotting components of composite p.d.f.s. | |

file | rf206_treevistools.C |

Addition and convolution: tools for visualization of RooAbsArg expression trees | |

file | rf206_treevistools.py |

Addition and convolution: tools for visualization of ROOT.RooAbsArg expression trees | |

file | rf207_comptools.C |

Addition and convolution: tools and utilities for manipulation of composite objects | |

file | rf208_convolution.C |

Addition and convolution: one-dimensional numeric convolution | |

file | rf209_anaconv.C |

Addition and convolution: decay function p.d.fs with optional B physics effects (mixing and CP violation) | |

file | rf209_anaconv.py |

Addition and convolution: decay function p.d.fs with optional B physics effects (mixing and CP violation) that can be analytically convolved with e.g. | |

file | rf210_angularconv.C |

Addition and convolution: convolution in cyclical angular observables theta | |

file | rf211_paramconv.C |

Addition and convolution: working with a p.d.f. | |

file | rf301_composition.C |

Multidimensional models: multi-dimensional p.d.f.s through composition e.g. | |

file | rf301_composition.py |

Multidimensional models: multi-dimensional p.d.f.s through composition, e.g. | |

file | rf302_utilfuncs.C |

Multidimensional models: utility functions classes available for use in tailoring of composite (multidimensional) pdfs | |

file | rf302_utilfuncs.py |

Multidimensional models: utility functions classes available for use in tailoring of composite (multidimensional) pdfs | |

file | rf303_conditional.C |

Multidimensional models: use of tailored p.d.f as conditional p.d.fs.s | |

file | rf304_uncorrprod.C |

Multidimensional models: simple uncorrelated multi-dimensional p.d.f.s | |

file | rf304_uncorrprod.py |

Multidimensional models: simple uncorrelated multi-dimensional p.d.f.s | |

file | rf305_condcorrprod.C |

Multidimensional models: multi-dimensional p.d.f.s with conditional p.d.fs in product | |

file | rf305_condcorrprod.py |

Multidimensional models: multi-dimensional p.d.f.s with conditional p.d.fs in product | |

file | rf306_condpereventerrors.C |

Multidimensional models: conditional p.d.f. | |

file | rf306_condpereventerrors.py |

Multidimensional models: complete example with use of conditional p.d.f. | |

file | rf307_fullpereventerrors.C |

Multidimensional models: full p.d.f. | |

file | rf307_fullpereventerrors.py |

Multidimensional models: usage of full p.d.f. | |

file | rf308_normintegration2d.C |

Multidimensional models: normalization and integration of p.d.fs, construction of cumulative distribution functions from p.d.f.s in two dimensions | |

file | rf308_normintegration2d.py |

| |

file | rf309_ndimplot.C |

Multidimensional models: making 2/3 dimensional plots of p.d.f.s and datasets | |

file | rf309_ndimplot.py |

| |

file | rf310_sliceplot.C |

Multidimensional models: projecting p.d.f and data slices in discrete observables | |

file | rf310_sliceplot.py |

| |

file | rf311_rangeplot.C |

Multidimensional models: projecting p.d.f and data ranges in continuous observables | |

file | rf311_rangeplot.py |

| |

file | rf312_multirangefit.C |

Multidimensional models: performing fits in multiple (disjoint) ranges in one or more dimensions | |

file | rf312_multirangefit.py |

| |

file | rf313_paramranges.C |

Multidimensional models: working with parametrized ranges to define non-rectangular regions for fitting and integration | |

file | rf313_paramranges.py |

| |

file | rf314_paramfitrange.C |

Multidimensional models: working with parametrized ranges in a fit. | |

file | rf314_paramfitrange.py |

| |

file | rf315_projectpdf.C |

Multidimensional models: marginizalization of multi-dimensional p.d.f.s through integration | |

file | rf315_projectpdf.py |

| |

file | rf316_llratioplot.C |

Multidimensional models: using the likelihood ratio technique to construct a signal enhanced one-dimensional projection of a multi-dimensional p.d.f. | |

file | rf316_llratioplot.py |

| |

file | rf401_importttreethx.C |

Data and categories: advanced options for importing data from ROOT TTree and THx histograms | |

file | rf402_datahandling.C |

Data and categories: tools for manipulation of (un)binned datasets | |

file | rf402_datahandling.py |

| |

file | rf403_weightedevts.C |

Data and categories: using weights in unbinned datasets | |

file | rf404_categories.C |

Data and categories: working with RooCategory objects to describe discrete variables | |

file | rf404_categories.py |

| |

file | rf405_realtocatfuncs.C |

Data and categories: demonstration of real–>discrete mapping functions | |

file | rf405_realtocatfuncs.py |

| |

file | rf406_cattocatfuncs.C |

Data and categories: demonstration of discrete–>discrete (invertable) functions | |

file | rf406_cattocatfuncs.py |

| |

file | rf407_latextables.C |

Data and categories: latex printing of lists and sets of RooArgSets | |

file | rf407_latextables.py |

| |

file | rf501_simultaneouspdf.C |

Organisation and simultaneous fits: using simultaneous p.d.f.s to describe simultaneous fits to multiple datasets | |

file | rf501_simultaneouspdf.py |

| |

file | rf502_wspacewrite.C |

Organisation and simultaneous fits: creating and writing a workspace | |

file | rf502_wspacewrite.py |

| |

file | rf503_wspaceread.C |

Organisation and simultaneous fits: reading and using a workspace | |

file | rf504_simwstool.C |

Organisation and simultaneous fits: using RooSimWSTool to construct a simultaneous p.d.f that is built of variations of an input p.d.f | |

file | rf504_simwstool.py |

| |

file | rf505_asciicfg.C |

Organisation and simultaneous fits: reading and writing ASCII configuration files | |

file | rf505_asciicfg.py |

| |

file | rf506_msgservice.C |

Organisation and simultaneous fits: tuning and customizing the RooFit message logging facility | |

file | rf506_msgservice.py |

| |

file | rf507_debugtools.C |

Organization and simultaneous fits: RooFit memory tracing debug tool | |

file | rf507_debugtools.py |

| |

file | rf508_listsetmanip.C |

Organization and simultaneous fits: RooArgSet and RooArgList tools and tricks | |

file | rf509_wsinteractive.C |

Organization and simultaneous fits: easy interactive access to workspace contents - CINT to CLING code migration | |

file | rf509_wsinteractive.py |

| |

file | rf510_wsnamedsets.C |

Organization and simultaneous fits: working with named parameter sets and parameter snapshots in workspaces | |

file | rf511_wsfactory_basic.C |

Organization and simultaneous fits: basic use of the 'object factory' associated with a workspace to rapidly build p.d.f.s functions and their parameter components | |

file | rf511_wsfactory_basic.py |

| |

file | rf512_wsfactory_oper.C |

Organization and simultaneous fits: operator expressions and expression-based basic p.d.f.s in the workspace factory syntax | |

file | rf513_wsfactory_tools.C |

Organization and simultaneous fits: RooCustomizer and RooSimWSTool interface in factory workspace tool in a complex standalone B physics example | |

file | rf513_wsfactory_tools.py |

| |

file | rf601_intminuit.C |

Likelihood and minimization: interactive minimization with MINUIT | |

file | rf602_chi2fit.C |

Likelihood and minimization: setting up a chi^2 fit to a binned dataset | |

file | rf603_multicpu.C |

Likelihood and minimization: setting up a multi-core parallelized unbinned maximum likelihood fit | |

file | rf603_multicpu.py |

| |

file | rf604_constraints.C |

Likelihood and minimization: fitting with constraints | |

file | rf604_constraints.py |

| |

file | rf605_profilell.C |

Likelihood and minimization: working with the profile likelihood estimator | |

file | rf606_nllerrorhandling.C |

Likelihood and minimization: understanding and customizing error handling in likelihood evaluations | |

file | rf607_fitresult.C |

Likelihood and minimization: demonstration of options of the RooFitResult class | |

file | rf607_fitresult.py |

| |

file | rf608_fitresultaspdf.C |

Likelihood and minimization: representing the parabolic approximation of the fit as a multi-variate Gaussian on the parameters of the fitted p.d.f. | |

file | rf608_fitresultaspdf.py |

| |

file | rf609_xychi2fit.C |

Likelihood and minimization: setting up a chi^2 fit to an unbinned dataset with X,Y,err(Y) values (and optionally err(X) values) | |

file | rf609_xychi2fit.py |

| |

file | rf610_visualerror.C |

Likelihood and minimization: visualization of errors from a covariance matrix | |

file | rf610_visualerror.py |

| |

file | rf701_efficiencyfit.C |

Speecial p.d.f. | |

file | rf701_efficiencyfit.py |

| |

file | rf702_efficiencyfit_2D.C |

Speecial p.d.f. | |

file | rf702_efficiencyfit_2D.py |

| |

file | rf703_effpdfprod.C |

Speecial p.d.f. | |

file | rf703_effpdfprod.py |

| |

file | rf704_amplitudefit.C |

Speecial p.d.f. | |

file | rf704_amplitudefit.py |

| |

file | rf705_linearmorph.C |

Speecial p.d.f. | |

file | rf706_histpdf.C |

Speecial p.d.f. | |

file | rf706_histpdf.py |

| |

file | rf707_kernelestimation.C |

Speecial p.d.f. | |

file | rf707_kernelestimation.py |

| |

file | rf708_bphysics.C |

Speecial p.d.f. | |

file | rf708_bphysics.py |

| |

file | rf801_mcstudy.C |

Validation and MC studies: toy Monte Carlo study that perform cycles of event generation and fitting | |

file | rf801_mcstudy.py |

| |

file | rf802_mcstudy_addons.C |

Validation and MC studies: RooMCStudy - using separate fit and generator models, using the chi^2 calculator model | |

file | rf803_mcstudy_addons2.C |

Validation and MC studies: RooMCStudy - Using the randomizer and profile likelihood add-on models | |

file | rf804_mcstudy_constr.C |

Validation and MC studies: using RooMCStudy on models with constrains | |

file | rf901_numintconfig.C |

Numeric algorithm tuning: configuration and customization of how numeric (partial) integrals are executed | |

file | rf902_numgenconfig.C |

Numeric algorithm tuning: configuration and customization of how MC sampling algorithms on specific p.d.f.s are executed | |

file | rf903_numintcache.C |

Numeric algorithm tuning: caching of slow numeric integrals and parameterization of slow numeric integrals | |