Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
65
66 /// minimize likelihood
68
69
70 mutable std::unique_ptr<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,3) // 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:346
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
Abstract base class for binned and unbinned datasets.
Definition RooAbsData.h:57
Abstract interface for all probability density functions.
Definition RooAbsPdf.h:40
Abstract base class for objects that represent a real value and implements functionality common to al...
Definition RooAbsReal.h:59
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:24
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:35
The ProfileLikelihoodCalculator is a concrete implementation of CombinedCalculator (the interface cla...
static RooFit::OwningPtr< 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 ...
RooFit::OwningPtr< 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)
T * OwningPtr
An alias for raw pointers for indicating that the return type of a RooFit function is an owning point...
Definition Config.h:35
Namespace for the RooStats classes.
Definition CodegenImpl.h:58