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 
18 namespace RooStats {
19 
20  class LikelihoodInterval;
21 
22  class ProfileLikelihoodCalculator : public CombinedCalculator {
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
67  static RooFitResult * DoMinimizeNLL(RooAbsReal * nll);
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
RooAbsData
Definition: RooAbsData.h:46
RooStats::ProfileLikelihoodCalculator
Definition: ProfileLikelihoodCalculator.h:28
CombinedCalculator.h
RooStats::ProfileLikelihoodCalculator::fFitResult
RooFitResult * fFitResult
Definition: ProfileLikelihoodCalculator.h:76
RooStats::ProfileLikelihoodCalculator::GetHypoTest
virtual HypoTestResult * GetHypoTest() const
Return the hypothesis test result obtained from the likelihood ratio of the maximum likelihood value ...
Definition: ProfileLikelihoodCalculator.cxx:301
RooStats::ProfileLikelihoodCalculator::~ProfileLikelihoodCalculator
virtual ~ProfileLikelihoodCalculator()
destructor cannot delete prod pdf because it will delete all the composing pdf's if (fOwnPdf) delete ...
Definition: ProfileLikelihoodCalculator.cxx:113
RooAbsReal
Definition: RooAbsReal.h:61
RooFitResult
Definition: RooFitResult.h:40
RooStats::ProfileLikelihoodCalculator::fGlobalFitDone
bool fGlobalFitDone
Definition: ProfileLikelihoodCalculator.h:77
LikelihoodInterval.h
RooStats::ProfileLikelihoodCalculator::GetInterval
virtual LikelihoodInterval * GetInterval() const
Return a likelihood interval.
Definition: ProfileLikelihoodCalculator.cxx:223
RooStats::ProfileLikelihoodCalculator::DoMinimizeNLL
static RooFitResult * DoMinimizeNLL(RooAbsReal *nll)
Definition: ProfileLikelihoodCalculator.cxx:169
Double_t
double Double_t
Definition: RtypesCore.h:59
RooStats
Definition: Asimov.h:19
RooStats::ProfileLikelihoodCalculator::ProfileLikelihoodCalculator
ProfileLikelihoodCalculator()
Default constructor (needed for I/O)
Definition: ProfileLikelihoodCalculator.cxx:83
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
RooStats::HypoTestResult
Definition: HypoTestResult.h:28
make_cnn_model.model
model
Definition: make_cnn_model.py:6
RooAbsPdf
Definition: RooAbsPdf.h:40
RooStats::ProfileLikelihoodCalculator::DoGlobalFit
RooAbsReal * DoGlobalFit() const
Definition: ProfileLikelihoodCalculator.cxx:124
RooStats::ModelConfig
Definition: ModelConfig.h:36
RooStats::ProfileLikelihoodCalculator::DoReset
void DoReset() const
Definition: ProfileLikelihoodCalculator.cxx:117
RooStats::LikelihoodInterval
Definition: LikelihoodInterval.h:34
RooArgSet
Definition: RooArgSet.h:28