Hypothesis Testing (and Limit Setting)

Setting up and Installing RooFat

First set up your development space:

mkdir source build
cd build
acmSetup AthAnalysis,21.2.23

now checkout and compile RooFat:

acm clone_project RooFat will/RooFat RooFat2018
acm find_packages
acm compile

Model building

There are a number of tools and ways you can build models, but in the end we assume that you successfully produce a RooFit pdf representing the complete model, with a RooFit dataset to represent the observed data.

If you are using the histfactory model builder, this should provide you with a ROOT file containing a RooWorkspace that holds both the pdf and the observed data.

Example based on a workspace produced by histfactory (hist2workspace, histfitter, etc)
TFile f("path/to/workspace.root");
RooWorkspace* w = (RooWorkspace*)f.Get("combined"); //get pointer to the workspace

w->pdf("simPdf"); //pointer to the pdf representing the complete model produced by HistFactory
w->data("obsData"); //pointer to the observed data
w->var("mu"); //pointer to the parameter of interest (name will vary depending on your setup)

For this tutorial we will use TRooFit to build a simple signal+background model with an uncertainty on the background.

To checkout and install TRooFit you can do:

acm clone_project will/TRooFit
acm find_packages
acm compile

Here's an example of a simple signal+background model:

Creating the RooHypoModel

The first thing you need to create is a RooHypoModel object. You do this with the model pdf object, the data object, and the parameter(s) of interest.

RooHypoModel hm("hm","My HypoModel",*w->pdf("simPdf"),*w->data("obsData"),*w->var("mu"));

When you create this object, you will get printout to the screen of the various variables of the model that have been detected. They are categorised as follows:

Variable type Description
Observables (obs) Variables defined as part of the dataset (data->get()->Print()), so are treated as observables
Global Observables (gobs) Constant-valued variables that feature in constraint terms in the pdf
Parameters of interest (poi) The variables specified in the constructor of RooHypoModel
Nuisance parameters (np) All other floating variables in the model
Model arguments (args) All constant-valued variables in the model that are not detected to be global observables

For a given hypothesis test or limit estimation, model arguments are held fixed. Observables and global observables are randomly varied when throwing toys but are fixed in fits. Nuisance parameters always float during fits, and parameters of interest float during unconditional fits but are fixed when performing conditional fits. The standard frequentist test statistics are likelihood ratios where the denominator is calculated after an unconditional fit and the numerator is calculated after a conditional fit.

-- WillButtinger - 2018-04-11

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r2 - 2018-04-11 - WillButtinger
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

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