Skip to content

Commit a654759

Browse files
committed
[doc] update the roofit tutorials page
1 parent 618f0d9 commit a654759

File tree

2 files changed

+188
-1
lines changed

2 files changed

+188
-1
lines changed

tutorials/roofit/index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
\defgroup tutorial_roofit_main RooFit
22
\ingroup tutorial_roofit
3-
\brief These tutorials illustrate the main features of RooFit. A more indepth description of the codes can be found at [RooFit User Manual](https://root.cern/download/doc/RooFit_Users_Manual_2.91-33.pdf)
43

54
\defgroup tutorial_roostats RooStats
65
\ingroup tutorial_roofit

tutorials/roofit/roofit/index.md

Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
\addtogroup tutorial_roofit_main RooFit
2+
\ingroup tutorial_roofit
3+
4+
@{
5+
Explore the tutorials below to discover the main features of RooFit. A more indepth description of the codes can be found at [RooFit User Manual](https://root.cern/download/doc/RooFit_Users_Manual_2.91-33.pdf)
6+
7+
8+
## Tutorials sorted after groups
9+
10+
- [Basic Functionalities](\ref roofit_basic)
11+
- [Addition and Convolution](\ref roofit_addition_convolution)
12+
- [Multidimensional Models](\ref roofit_multidimentional_models)
13+
- [Data and Categories](\ref roofit_data_categories)
14+
- [Organisation and Simultaneous Fits](\ref roofit_organisation_fits)
15+
- [Likelihood and Minimization](\ref roofit_likelihood_maximization)
16+
- [Special Pdf's](\ref roofit_special_pdfs)
17+
- [Validation and MC Studies](\ref roofit_validation_mc)
18+
- [Numeric Algorithm Tuning](\ref roofit_numeric_algorithm_tuning)
19+
- [Misc.](\ref roofit_misc)
20+
21+
22+
[List of all tutorials](\ref roofit_alltutorials)
23+
24+
\anchor roofit_basic
25+
## Introduction
26+
27+
| **Tutorial** || **Description** |
28+
|------|--------|-----------------|
29+
| rf101_basics.C| rf101_basics.py | Fitting, plotting, toy data generation on one-dimensional PDFs.|
30+
| rf102_dataimport.C | rf102_dataimport.py | Importing data from ROOT TTrees and THx histograms.|
31+
| rf103_interprfuncs.C | rf103_interprfuncs.py | Interpreted functions and PDFs.|
32+
| rf104_classfactory.C | rf104_classfactory.py | The class factory for functions and pdfs.|
33+
| rf105_funcbinding.C | rf105_funcbinding.py | Binding ROOT math functions as RooFit functions and pdfs.|
34+
| rf106_plotdecoration.C | rf106_plotdecoration.py | Adding boxes with parameters, statistics to RooPlots, decorating with arrows, text etc...|
35+
| rf107_plotstyles.C | rf107_plotstyles.py | Various plotting styles of data, functions in a RooPlot.|
36+
| rf108_plotbinning.C | rf108_plotbinning.py | Plotting unbinned data with alternate and variable binnings.|
37+
| rf109_chi2residpull.C | rf109_chi2residpull.py | Calculating chi^2 from histograms and curves in RooPlots, making histogram of residual and pull distributions.|
38+
| rf110_normintegration.C | rf110_normintegration.py | Normalization and integration of pdfs, construction of cumulative distribution monodimensional functions.|
39+
| rf111_derivatives.C | rf111_derivatives.py | Numerical 1st,2nd and 3rd order derivatives w.r.t. observables and parameters.|
40+
41+
42+
\anchor roofit_addition_convolution
43+
## Addition and Convolution
44+
45+
| **Tutorial** || **Description** |
46+
|------|--------|-----------------|
47+
| rf201_composite.C| rf201_composite.py | Composite pdf with signal and background component.|
48+
| rf202_extendedmlfit.C| rf202_extendedmlfit.py | Setting up an extended maximum likelihood fit.|
49+
| rf203_ranges.C| rf203_ranges.py | Fitting and plotting in sub ranges.|
50+
| rf205_compplot.C| rf205_compplot.py | Options for plotting components of composite pdfs.|
51+
| rf206_treevistools.C| rf206_treevistools.py | Tools for visualization of RooAbsArg expression trees.|
52+
| rf207_comptools.C| rf207_comptools.py | Tools and utilities for manipulation of composite objects.|
53+
| rf208_convolution.C| rf208_convolution.py | One-dimensional numeric convolution.|
54+
| rf209_anaconv.C| rf209_anaconv.py |decay function pdfs with optional B physics effects (mixing and CP violation).|
55+
| rf210_angularconv.C| rf210_angularconv.py | Convolution in cyclical angular observables theta.|
56+
| rf211_paramconv.C| rf211_paramconv.py | Working with a pdf with a convolution operator in terms of a parameter.|
57+
58+
\anchor roofit_multidimentional_models
59+
## Multidimensional Models
60+
61+
| **Tutorial** || **Description** |
62+
|------|--------|-----------------|
63+
| rf301_composition.C| rf301_composition.py | Multi-dimensional pdfs through composition, e.g. substituting a pdf parameter with a function that depends on other observables.|
64+
| rf302_utilfuncs.C| rf302_utilfuncs.py | Utility functions classes available for use in tailoring of composite (multidimensional) pdfs.|
65+
| rf303_conditional.C| rf303_conditional.py | Use of tailored pdf as conditional pdfs.s.|
66+
| rf304_uncorrprod.C| rf304_uncorrprod.py | Simple uncorrelated multi-dimensional pdfs.|
67+
| rf305_condcorrprod.C| rf305_condcorrprod.py | Multi-dimensional pdfs with conditional pdfs in product.|
68+
| rf306_condpereventerrors.C| rf306_condpereventerrors.py | Conditional pdf with per-event errors.|
69+
| rf307_fullpereventerrors.C| rf307_fullpereventerrors.py | Full pdf with per-event errors.|
70+
| rf308_normintegration2d.C| rf308_normintegration2d.py | Normalization and integration of pdfs, construction of cumulative distribution functions from pdfs in two dimensions.|
71+
| rf309_ndimplot.C| rf309_ndimplot.py | Making 2/3 dimensional plots of pdfs and datasets.|
72+
| rf310_sliceplot.C| rf310_sliceplot.py | Projecting pdf and data slices in discrete observables.|
73+
| rf311_rangeplot.C| rf311_rangeplot.py | Projecting pdf and data ranges in continuous observables.|
74+
| rf312_multirangefit.C| rf312_multirangefit.py | Performing fits in multiple (disjoint) ranges in one or more dimensions.|
75+
| rf313_paramranges.C| rf313_paramranges.py | Working with parametrized ranges to define non-rectangular regions for fitting and integration.|
76+
| rf314_paramfitrange.C| rf314_paramfitrange.py | Working with parametrized ranges in a fit. This an example of a fit with an acceptance that changes per-event.|
77+
| rf315_projectpdf.C| rf315_projectpdf.py | Marginizalization of multi-dimensional pdfs through integration.|
78+
| rf316_llratioplot.C| rf316_llratioplot.py | Using the likelihood ratio technique to construct a signal enhanced one-dimensional projection of a multi-dimensional pdf.|
79+
80+
81+
\anchor roofit_data_categories
82+
## Data and Categories
83+
84+
| **Tutorial** || **Description** |
85+
|------|--------|-----------------|
86+
| rf401_importttreethx.C| rf401_importttreethx.py | Advanced options for importing data from ROOT TTree and THx histograms.|
87+
| rf402_datahandling.C| rf402_datahandling.py | Tools for manipulation of (un)binned datasets.|
88+
| rf403_weightedevts.C| rf403_weightedevts.py | Using weights in unbinned datasets.|
89+
| rf404_categories.C| rf404_categories.py | Working with RooCategory objects to describe discrete variables.|
90+
| rf405_realtocatfuncs.C| rf405_realtocatfuncs.py | Demonstration of real-->discrete mapping functions.|
91+
| rf406_cattocatfuncs.C| rf406_cattocatfuncs.py | Demonstration of discrete-->discrete (invertible) functions.|
92+
| rf407_ComputationalGraphVisualization.C| rf407_ComputationalGraphVisualization.py | Visualing computational graph model before fitting, and latex printing of lists and sets of RooArgSets after fitting.|
93+
94+
\anchor roofit_organisation_fits
95+
## Organisation and Simultaneous Fits
96+
97+
| **Tutorial** || **Description** |
98+
|------|--------|-----------------|
99+
| rf501_simultaneouspdf.C| rf501_simultaneouspdf.py | Using simultaneous pdfs to describe simultaneous fits to multiple datasets.|
100+
| rf502_wspacewrite.C| rf502_wspacewrite.py | Creating and writing a workspace.|
101+
| rf503_wspaceread.C| rf503_wspaceread.py | Reading and using a workspace.|
102+
| rf504_simwstool.C| rf504_simwstool.py | Using RooSimWSTool to construct a simultaneous pdf that is built of variations of an input pdf.|
103+
| rf505_asciicfg.C| rf505_asciicfg.py | Reading and writing ASCII configuration files.|
104+
| rf506_msgservice.C| rf506_msgservice.py | Tuning and customizing the RooFit message logging facility.|
105+
| rf508_listsetmanip.C| rf508_listsetmanip.py | RooArgSet and RooArgList tools and tricks.|
106+
| rf510_wsnamedsets.C| rf510_wsnamedsets.py | Working with named parameter sets and parameter snapshots in workspaces.|
107+
| rf511_wsfactory_basic.C| rf511_wsfactory_basic.py | Basic use of the 'object factory' associated with a workspace to rapidly build pdfs functions and their parameter components.|
108+
| rf512_wsfactory_oper.C| rf512_wsfactory_oper.py | Pperator expressions and expression-based basic pdfs in the workspace factory syntax.|
109+
| rf513_wsfactory_tools.C| rf513_wsfactory_tools.py | RooCustomizer and RooSimWSTool interface in factory workspace tool in a complex standalone B physics example.|
110+
111+
\anchor roofit_likelihood_maximization
112+
## Likelihood and Minimization
113+
114+
| **Tutorial** || **Description** |
115+
|------|--------|-----------------|
116+
| rf601_intminuit.C| rf601_intminuit.py | Interactive minimization with MINUIT.|
117+
| rf602_chi2fit.C| rf602_chi2fit.py | Setting up a chi^2 fit to a binned dataset.|
118+
| rf604_constraints.C| rf604_constraints.py | Fitting with constraints.|
119+
| rf605_profilell.C| rf605_profilell.py | Working with the profile likelihood estimator.|
120+
| rf606_nllerrorhandling.C| rf606_nllerrorhandling.py | Understanding and customizing error handling in likelihood evaluations.|
121+
| rf607_fitresult.C| rf607_fitresult.py | Demonstration of options of the RooFitResult class.|
122+
| rf608_fitresultaspdf.C| rf608_fitresultaspdf.py | Representing the parabolic approximation of the fit as a multi-variate Gaussian on the parameters of the fitted pdf.|
123+
| rf609_xychi2fit.C| rf609_xychi2fit.py | Setting up a chi^2 fit to an unbinned dataset with X,Y,err(Y) values (and optionally err(X) values).|
124+
| rf610_visualerror.C| rf610_visualerror.py | Visualization of errors from a covariance matrix.|
125+
| rf611_weightedfits.C| | Parameter uncertainties for weighted unbinned ML fits.|
126+
| rf612_recoverFromInvalidParameters.C| rf612_recoverFromInvalidParameters.py | Recover from regions where the function is not defined.|
127+
128+
\anchor roofit_special_pdfs
129+
## Special Pdf's
130+
131+
| **Tutorial** || **Description** |
132+
|------|--------|-----------------|
133+
| rf701_efficiencyfit.C| rf701_efficiencyfit.py | Unbinned maximum likelihood fit of an efficiency eff(x) function.|
134+
| rf702_efficiencyfit_2D.C| rf702_efficiencyfit_2D.py | Unbinned maximum likelihood fit of an efficiency eff(x) function to a dataset D(x,cut), cut is a category encoding a selection whose efficiency as function of x should be described by eff(x).|
135+
| rf703_effpdfprod.C| rf703_effpdfprod.py | Using a product of an (acceptance) efficiency and a pdf as pdf.|
136+
| rf704_amplitudefit.C| rf704_amplitudefit.py | Using a pdf defined by a sum of real-valued amplitude components.|
137+
| rf705_linearmorp.C| rf705_linearmorp.py | Linear interpolation between pdf shapes using the 'Alex Read' algorithm.|
138+
| rf706_histpdf.C| rf706_histpdf.py | Histogram-based pdfs and functions.|
139+
| rf707_kernelestimation.C| rf707_kernelestimation.py | Using non-parametric (multi-dimensional) kernel estimation pdfs.|
140+
| rf708_bphysics.C| rf708_bphysics.py | Special decay pdf for B physics with mixing and/or CP violation.|
141+
142+
\anchor roofit_validation_mc
143+
## Validation and MC Studies
144+
145+
| **Tutorial** || **Description** |
146+
|------|--------|-----------------|
147+
| rf801_mcstudy.C| rf801_mcstudy.py | Toy Monte Carlo study that perform cycles of event generation and fitting.|
148+
| rf802_mcstudy_addons.C| | RooMCStudy - using separate fit and generator models, using the chi^2 calculator model. Running a biased fit model against an optimal fit.|
149+
| rf803_mcstudy_addons2.C| | RooMCStudy - Using the randomizer and profile likelihood add-on models.|
150+
| rf804_mcstudy_constr.C| | Using RooMCStudy on models with constrains.|
151+
152+
153+
\anchor roofit_numeric_algorithm_tuning
154+
## Numeric Algorithm Tuning
155+
156+
| **Tutorial** || **Description** |
157+
|------|--------|-----------------|
158+
| rf901_numintconfig.C| rf901_numintconfig.py | Configuration and customization of how numeric (partial) integrals are executed.|
159+
| rf902_numgenconfig.C| rf902_numgenconfig.py | Configuration and customization of how MC sampling algorithms on specific pdfs are executed.|
160+
| rf903_numintcache.C| rf903_numintcache.py | Caching of slow numeric integrals and parameterization of slow numeric integrals.|
161+
162+
163+
\anchor roofit_misc
164+
## Misc.
165+
166+
| **Tutorial** || **Description** |
167+
|------|--------|-----------------|
168+
| rf204a_extendedLikelihood.C| rf204a_extendedLikelihood.py | Extended maximum likelihood fit in multiple ranges.|
169+
| rf204b_extendedLikelihood_rangedFit.C| rf204b_extendedLikelihood_rangedFit.py | This macro demonstrates how to set up a fit in two ranges for plain likelihoods and extended likelihoods.|
170+
| rf212_plottingInRanges_blinding.C| rf212_plottingInRanges_blinding.py | Plot a PDF in disjunct ranges, and get normalisation right.|
171+
| rf408_RDataFrameToRooFit.C| rf408_RDataFrameToRooFit.py | Fill RooDataSet/RooDataHist in RDataFrame.|
172+
| rf409_NumPyPandasToRooFit.C| rf409_NumPyPandasToRooFit.py | Convert between NumPy arrays or Pandas DataFrames and RooDataSets.|
173+
| rf514_RooCustomizer.C| rf514_RooCustomizer.py | Using the RooCustomizer to create multiple PDFs that share a lot of properties, but have unique parameters for each category. As an extra complication, some of the new parameters need to be functions of a mass parameter.|
174+
| | rf515_hfJSON.py | With the HS3 standard, it is possible to code RooFit-Models of any kind as JSON files. In this tutorial, you can see how to code up a (simple) HistFactory-based model in JSON and import it into a RooWorkspace.|
175+
| rf613_global_observables.C| rf613_global_observables.py | This tutorial explains the concept of global observables in RooFit, and showcases how their values can be stored either in the model or in the dataset.|
176+
| rf614_binned_fit_problems.C| rf614_binned_fit_problems.py | A tutorial that explains you how to solve problems with binning effects and numerical stability in binned fits.|
177+
| | rf615_simulation_based_inference.py | Use Simulation Based Inference (SBI) in RooFit.|
178+
| rf616_morphing.C| rf616_morphing.py | Use Morphing in RooFit.|
179+
| | rf617_simulation_based_inference_multidimensional.py | Use Simulation Based Inference (SBI) in multiple dimensions in RooFit.|
180+
| | rf618_mixture_models.py | Use of mixture models in RooFit.|
181+
| rf709_BarlowBeeston.C| rf709_BarlowBeeston.py | Implementing the Barlow-Beeston method for taking into account the statistical uncertainty of a Monte-Carlo fit template.|
182+
| rf710_roopoly.C| rf710_roopoly.py | Taylor expansion of RooFit functions using the taylorExpand function with RooPolyFunc.|
183+
| rf711_lagrangianmorph.C| rf711_lagrangianmorph.py | Morphing effective field theory distributions with RooLagrangianMorphFunc. A morphing function as a function of one coefficient is setup and can be used to obtain the distribution for any value of the coefficient.|
184+
| rf712_lagrangianmorphfit.C| rf712_lagrangianmorphfit.py | Performing a simple fit with RooLagrangianMorphFunc. A morphing function is setup as a function of three variables and a fit is performed on a pseudo-dataset.|
185+
186+
\anchor roofit_alltutorials
187+
188+
@}

0 commit comments

Comments
 (0)