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_t size = 0.05, const RooArgSet* nullParams = 0 );
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 virtual LikelihoodInterval* GetInterval() const ;
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 virtual HypoTestResult* GetHypoTest() const;
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 ClassDef(ProfileLikelihoodCalculator,2) // A concrete implementation of CombinedCalculator that uses the ProfileLikelihood ratio.
75
76 };
77}
78#endif
double Double_t
Definition: RtypesCore.h:57
#define ClassDef(name, id)
Definition: Rtypes.h:322
RooAbsData is the common abstract base class for binned and unbinned datasets.
Definition: RooAbsData.h:44
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition: RooAbsReal.h:60
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgSet.h:28
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...
virtual HypoTestResult * GetHypoTest() const
Return the hypothesis test result obtained from the likelihood ratio of the maximum likelihood value ...
static RooFitResult * DoMinimizeNLL(RooAbsReal *nll)
virtual LikelihoodInterval * GetInterval() const
Return a likelihood interval.
ProfileLikelihoodCalculator()
Default constructor (needed for I/O)
virtual ~ProfileLikelihoodCalculator()
destructor cannot delete prod pdf because it will delete all the composing pdf's if (fOwnPdf) delete ...
Namespace for the RooStats classes.
Definition: Asimov.h:19