Logo ROOT  
Reference Guide
RooProfileLL.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * *
4 * Copyright (c) 2000-2005, Regents of the University of California *
5 * and Stanford University. All rights reserved. *
6 * *
7 * Redistribution and use in source and binary forms, *
8 * with or without modification, are permitted according to the terms *
9 * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
10 *****************************************************************************/
11
12#ifndef ROOPROFILELL
13#define ROOPROFILELL
14
15#include "RooAbsReal.h"
16#include "RooRealProxy.h"
17#include "RooSetProxy.h"
18#include <map>
19#include <string>
20
21class RooMinimizer ;
22class RooMinuit ;
23
24#define MINIMIZER RooMinimizer
25
26class RooProfileLL : public RooAbsReal {
27public:
28
29 RooProfileLL() ;
30 RooProfileLL(const char *name, const char *title, RooAbsReal& nll, const RooArgSet& observables);
31 RooProfileLL(const RooProfileLL& other, const char* name=0) ;
32 virtual TObject* clone(const char* newname) const { return new RooProfileLL(*this,newname); }
33 virtual ~RooProfileLL() ;
34
37
39 RooAbsReal& nll() { return const_cast<RooAbsReal&>(_nll.arg()) ; }
40 const RooArgSet& bestFitParams() const ;
41 const RooArgSet& bestFitObs() const ;
42
43 virtual RooAbsReal* createProfile(const RooArgSet& paramsOfInterest) ;
44
45 virtual Bool_t redirectServersHook(const RooAbsCollection& /*newServerList*/, Bool_t /*mustReplaceAll*/, Bool_t /*nameChange*/, Bool_t /*isRecursive*/) ;
46
48
49 Int_t numEval() const { return _neval ; }
50
51
52protected:
53
54 void validateAbsMin() const ;
55 void initializeMinimizer() const ;
56
57 RooRealProxy _nll ; // Input -log(L) function
58 RooSetProxy _obs ; // Parameters of profile likelihood
59 RooSetProxy _par ; // Marginialized parameters of likelihood
60 Bool_t _startFromMin ; // Always start minimization for global minimum?
61
62 TIterator* _piter ; //! Iterator over profile likelihood parameters to be minimized
63 TIterator* _oiter ; //! Iterator of profile likelihood output parameter(s)
64
65 mutable MINIMIZER* _minimizer ; //! Internal minuit instance
66
67 mutable Bool_t _absMinValid ; // flag if absmin is up-to-date
68 mutable Double_t _absMin ; // absolute minimum of -log(L)
69 mutable RooArgSet _paramAbsMin ; // Parameter values at absolute minimum
70 mutable RooArgSet _obsAbsMin ; // Observable values at absolute minimum
71 mutable std::map<std::string,bool> _paramFixed ; // Parameter constant status at last time of use
72 mutable Int_t _neval ; // Number evaluations used in last minimization
73 Double_t evaluate() const ;
74
75
76private:
77
78 ClassDef(RooProfileLL,0) // Real-valued function representing profile likelihood of external (likelihood) function
79};
80
81#endif
#define MINIMIZER
Definition: RooProfileLL.h:24
const Bool_t kFALSE
Definition: RtypesCore.h:90
double Double_t
Definition: RtypesCore.h:57
#define ClassDef(name, id)
Definition: Rtypes.h:322
char name[80]
Definition: TGX11.cxx:109
RooAbsCollection is an abstract container object that can hold multiple RooAbsArg objects.
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
RooMinimizer is a wrapper class around ROOT::Fit:Fitter that provides a seamless interface between th...
Definition: RooMinimizer.h:38
RooMinuit is a wrapper class around TFitter/TMinuit that provides a seamless interface between the MI...
Definition: RooMinuit.h:38
Class RooProfileLL implements the profile likelihood estimator for a given likelihood and set of para...
Definition: RooProfileLL.h:26
virtual ~RooProfileLL()
Destructor.
const RooArgSet & bestFitObs() const
RooArgSet _paramAbsMin
Definition: RooProfileLL.h:69
RooSetProxy _obs
Definition: RooProfileLL.h:58
RooProfileLL()
Default constructor Should only be used by proof.
void initializeMinimizer() const
TIterator * _piter
Definition: RooProfileLL.h:62
MINIMIZER * _minimizer
Iterator of profile likelihood output parameter(s)
Definition: RooProfileLL.h:65
void clearAbsMin()
Definition: RooProfileLL.h:47
RooAbsReal & nll()
Definition: RooProfileLL.h:39
std::map< std::string, bool > _paramFixed
Definition: RooProfileLL.h:71
virtual TObject * clone(const char *newname) const
Definition: RooProfileLL.h:32
void setAlwaysStartFromMin(Bool_t flag)
Definition: RooProfileLL.h:35
MINIMIZER * minimizer()
Definition: RooProfileLL.h:38
Double_t evaluate() const
Evaluate profile likelihood by minimizing likelihood w.r.t.
RooArgSet _obsAbsMin
Definition: RooProfileLL.h:70
Bool_t _startFromMin
Definition: RooProfileLL.h:60
TIterator * _oiter
Iterator over profile likelihood parameters to be minimized.
Definition: RooProfileLL.h:63
void validateAbsMin() const
Check that parameters and likelihood value for 'best fit' are still valid.
RooSetProxy _par
Definition: RooProfileLL.h:59
Bool_t alwaysStartFromMin() const
Definition: RooProfileLL.h:36
virtual RooAbsReal * createProfile(const RooArgSet &paramsOfInterest)
Optimized implementation of createProfile for profile likelihoods.
virtual Bool_t redirectServersHook(const RooAbsCollection &, Bool_t, Bool_t, Bool_t)
RooRealProxy _nll
Definition: RooProfileLL.h:57
Double_t _absMin
Definition: RooProfileLL.h:68
Int_t numEval() const
Definition: RooProfileLL.h:49
const RooArgSet & bestFitParams() const
Bool_t _absMinValid
Internal minuit instance.
Definition: RooProfileLL.h:67
RooSetProxy is the concrete proxy for RooArgSet objects.
Definition: RooSetProxy.h:24
const T & arg() const
Return reference to object held in proxy.
Iterator abstract base class.
Definition: TIterator.h:30
Mother of all ROOT objects.
Definition: TObject.h:37