Logo ROOT  
Reference Guide
ProfileLikelihoodCalculator.h
Go to the documentation of this file.
1// @(#)root/roostats:$Id$
2// Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke
3/*************************************************************************
4 * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
5 * All rights reserved. *
6 * *
7 * For the licensing terms see $ROOTSYS/LICENSE. *
8 * For the list of contributors see $ROOTSYS/README/CREDITS. *
9 *************************************************************************/
10
11#ifndef ROOSTATS_ProfileLikelihoodCalculator
12#define ROOSTATS_ProfileLikelihoodCalculator
13
15
17
18namespace RooStats {
19
20 class LikelihoodInterval;
21
23
24 public:
25
26 /// Default constructor (needed for I/O)
28
29 /// Constructor from data, from a full model pdf describing both parameter of interest and nuisance parameters
30 /// and from the set specifying the parameter of interest (POI).
31 /// There is no need to specify the nuisance parameters since they are all other parameters of the model.
32 /// When using the calculator for performing an hypothesis test one needs to provide also a snapshot (a copy)
33 /// defining the null parameters and their value. There is no need to pass the alternate parameters. These
34 /// will be obtained by the value maximizing the likelihood function
35 ProfileLikelihoodCalculator(RooAbsData& data, RooAbsPdf& pdf, const RooArgSet& paramsOfInterest,
36 double size = 0.05, const RooArgSet* nullParams = nullptr );
37
38
39 /// Constructor from data and a model configuration
40 /// If the ModelConfig defines a prior pdf for any of the parameters those will be included as constrained terms in the
41 /// likelihood function
43
44
46
47 /// Return a likelihood interval. A global fit to the likelihood is performed and
48 /// the interval is constructed using the profile likelihood ratio function of the POI.
49 LikelihoodInterval* GetInterval() const override ;
50
51 /// Return the hypothesis test result obtained from the likelihood ratio of the
52 /// maximum likelihood value with the null parameters fixed to their values, with respect to keeping all parameters
53 /// floating (global maximum likelihood value).
54 HypoTestResult* GetHypoTest() const override;
55
56
57
58 protected:
59
60 /// clear internal fit result
61 void DoReset() const;
62
63 /// perform a global fit
64 RooAbsReal * DoGlobalFit() const;
65
66 /// minimize likelihood
68
69
70 mutable RooFitResult * fFitResult; //// internal result of global fit
71 mutable bool fGlobalFitDone; ///< flag to control if a global fit has been done
72
73
74 ClassDefOverride(ProfileLikelihoodCalculator,2) // A concrete implementation of CombinedCalculator that uses the ProfileLikelihood ratio.
75
76 };
77}
78#endif
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
#define ClassDefOverride(name, id)
Definition: Rtypes.h:339
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
RooAbsData is the common abstract base class for binned and unbinned datasets.
Definition: RooAbsData.h:62
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition: RooAbsReal.h:62
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgSet.h:56
RooFitResult is a container class to hold the input and output of a PDF fit to a dataset.
Definition: RooFitResult.h:40
CombinedCalculator is an interface class for a tools which can produce both RooStats HypoTestResults ...
HypoTestResult is a base class for results from hypothesis tests.
LikelihoodInterval is a concrete implementation of the RooStats::ConfInterval interface.
ModelConfig is a simple class that holds configuration information specifying how a model should be u...
Definition: ModelConfig.h:30
The ProfileLikelihoodCalculator is a concrete implementation of CombinedCalculator (the interface cla...
static RooFitResult * DoMinimizeNLL(RooAbsReal *nll)
minimize likelihood
HypoTestResult * GetHypoTest() const override
Return the hypothesis test result obtained from the likelihood ratio of the maximum likelihood value ...
RooAbsReal * DoGlobalFit() const
perform a global fit
bool fGlobalFitDone
flag to control if a global fit has been done
~ProfileLikelihoodCalculator() override
destructor cannot delete prod pdf because it will delete all the composing pdf's if (fOwnPdf) delete ...
void DoReset() const
clear internal fit result
LikelihoodInterval * GetInterval() const override
Return a likelihood interval.
ProfileLikelihoodCalculator()
Default constructor (needed for I/O)
Namespace for the RooStats classes.
Definition: Asimov.h:19