RooFit/RooStats tutorials for Teraschool School of Statistics 2015

This is a set of RooFit/RooStats tutorials given at Teraschool school of statistics (23-27 March 2015) , see the school agenda.

The required materials used during the RooFit/RooStats tutorials is described. The materials consist of exercises that can be solved from what has been presented in the lecture. Two levels of help are provided: a hint and a full solution.

Here the hint is shown.
Here the solution is shown.
The hint allows to create the ROOT macro required to complete the exercise step by step, while the solution provides the full running code. The hint consists of code snippets, which can be combined to write a full ROOT macro to solve the exercise. If you are not able to write the macro yourself, because you find too difficult or because the time is not sufficient, you can go directly to the solution, which will contain the running code and (hopefully) you will be able to run the macro and get the result of the tutorial exercise.

You can find the single code attached (links at the end of the page) or you can use the provided tar file. Some points linked to the exercises are optional and marked with a Pointing hand icon: they are useful to scrutinise in more detail some aspects. Try to solve or look at them if you have the time.

Additional material can be found on:

Introduction

Getting started with the software

A few advice words before starting. The tutorials are based on the current recommended production version of ROOT, version 6.02.05, but they can work also with one of the latest 5.34 production version (e.g. 5.34.26) or with the development version 6.03.02.

  • If you are going to use your installed version of ROOT, make sure you have configured with RooFit ( ./configure --enable-roofit). You can check if roofit is installed in your version of ROOT by typing the command root-config --has-roofit. The answer must be yes. If not, you must re-configure ROOT and rebuild it or install a binary version of ROOT from the ROOT download page. See the ROOT Web site for a detailed description on how to install and configure ROOT.
  • A basic knowledge of ROOT is assumed, in particular how to run a ROOT macro. If you are using version 6, there is no need to run in compiled mode (ACLIC) since one can profit from the "just in time" capabilities of the Cling interpreter. If instead you are using the version 5.34 of ROOT (based on CINT), it is then better to run in compiled mode (ACLIC). This has the drawback to require the inclusion of all the needed header files.
           root>  .x myMacro.C        // interpreted mode (CINT or Cling)
           root>  .x myMacro.C+      // compiled mode (ACLIC)
  • It is recommended to add the following lines at the beginning of your ROOT macro, that will load automatically the Roofit and Roostats libraries (note that the RooStats calculator are defined in the RooStats namespace):
           using namespace RooFit;
           using namespace RooStats;    
  • Avoid running a macro multiple times in the same ROOT sessions (it might unfortunately crash sometimes if you do it, because some objects might not be properly deleted in the macro)
  • Note that Roostats methods start with capital letter (as in ROOT) while Roofit ones start with lower letter
  • The Roostats calculator are quite verbose, you can suppress the output by doing:
RooMsgService::instance().setGlobalKillBelow(RooFit::WARNING) ;

Some links to documentation:

Terminology and Conventions

Here we give pragmatic definitions for a few basic concepts that we will use.
  • observable - something you measure in an experiment, for example a particle's momentum. Often, a function of measured quantities, for example an invariant mass of several particles
  • global observable or auxiliary observable - an observable from another measurement, for example, the integrated luminosity
  • model - a set of probability density functions (PDFs), which describe distributions of the observables or functions of observables
  • model parameter - any variable in your PDF expression, which is not an observable
  • parameter of interest (POI) - a model parameter that you study, for example a cross section of your signal process
  • nuisance parameter - every other model parameter, which is not your parameter of interest
  • data or dataset - a set of values of observables, either measured in an experiment, or simulated
  • likelihood - a model computed for a particular dataset
  • hypothesis - a particular model, with specified observables, POI, nuisance parameters, and prior PDFs (in case of Bayesian inference)
  • prior PDF - a probability density for an observable or a model parameter, which is known a priori, i.e. before a measurement is considered. This is a Bayesian concept exclusively. Prior has no meaning or place in a frequentist type of inference
  • Bayesian - a type of statistical inference that usually produces probability of the hypothesis given the data. Requires a prior.
  • frequentist - a type of statistical inference that usually produces probability of the data given the hypothesis.

RooFit Exercises

RooStats Exercises

-- LorenzoMoneta - 2015-03-22

Edit | Attach | Watch | Print version | History: r10 < r9 < r8 < r7 < r6 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r10 - 2015-03-26 - LorenzoMoneta
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    RooStats All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback