Logo ROOT   6.08/07
Reference Guide
MCMCIntervalPlot.h
Go to the documentation of this file.
1 // @(#)root/roostats:$Id$
2 // Authors: Kevin Belasco 17/06/2009
3 // Authors: Kyle Cranmer 17/06/2009
4 /*************************************************************************
5  * Project: RooStats *
6  * Package: RooFit/RooStats *
7  *************************************************************************
8  * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
9  * All rights reserved. *
10  * *
11  * For the licensing terms see $ROOTSYS/LICENSE. *
12  * For the list of contributors see $ROOTSYS/README/CREDITS. *
13  *************************************************************************/
14 
15 #ifndef ROOSTATS_MCMCIntervalPlot
16 #define ROOSTATS_MCMCIntervalPlot
17 
18 #ifndef ROO_PRINTABLE
19 #include "RooPrintable.h"
20 #endif
21 #ifndef ROO_ARG_SET
22 #include "RooArgSet.h"
23 #endif
24 #ifndef ROOT_TNamed
25 #include "TNamed.h"
26 #endif
27 #ifndef ROOT_TH1
28 #include "TH1.h"
29 #endif
30 #ifndef RooStats_MCMCInterval
31 #include "RooStats/MCMCInterval.h"
32 #endif
33 #ifndef ROO_KEYS_PDF
34 #include "RooNDKeysPdf.h"
35 #endif
36 #ifndef ROO_PRODUCT
37 #include "RooProduct.h"
38 #endif
39 
40 namespace RooStats {
41 
42  /**
43 
44 
45  \ingroup Roostats
46 
47  This class provides simple and straightforward utilities to plot a MCMCInterval
48  object. Basic use only requires a few lines once you have an MCMCInterval*:
49 
50  ````
51  MCMCIntervalPlot plot(*interval);
52  plot.Draw();
53  ````
54 
55  The standard Draw() function will currently draw the confidence interval
56  range with bars if 1-D and a contour if 2-D. The MCMC posterior will also be
57  plotted for the 1-D case.
58 
59 */
60 
61  class MCMCIntervalPlot : public TNamed, public RooPrintable {
62 
63  public:
65  MCMCIntervalPlot(MCMCInterval& interval);
66 
67  /// Destructor of SamplingDistribution
68  virtual ~MCMCIntervalPlot();
69 
70  void SetMCMCInterval(MCMCInterval& interval);
71  void SetLineColor(Color_t color) {fLineColor = color;}
72  void SetLineWidth(Int_t width) {fLineWidth = width;}
73  void SetShadeColor(Color_t color) {fShadeColor = color;}
74  void SetShowBurnIn(Bool_t showBurnIn) { fShowBurnIn = showBurnIn; }
75 
76  void Draw(const Option_t* options = NULL);
77 
78  void DrawChainScatter(RooRealVar& xVar, RooRealVar& yVar);
79  void DrawParameterVsTime(RooRealVar& param);
80  void DrawNLLVsTime();
81  void DrawNLLHist(const Option_t* options = NULL);
82  void DrawWeightHist(const Option_t* options = NULL);
83 
84  private:
85 
105 
106  protected:
107  void DrawPosterior(const Option_t* options = NULL);
108  void* DrawPosteriorHist(const Option_t* options = NULL,
109  const char* title = NULL, Bool_t scale = kTRUE);
110  void* DrawPosteriorKeysPdf(const Option_t* options = NULL);
111  void* DrawPosteriorKeysProduct(const Option_t* options = NULL);
112 
113  void DrawInterval(const Option_t* options = NULL);
114  void DrawShortestInterval(const Option_t* options = NULL);
115  void DrawHistInterval(const Option_t* options = NULL);
116  void DrawKeysPdfInterval(const Option_t* options = NULL);
117  void DrawTailFractionInterval(const Option_t* options = NULL);
118 
119  ClassDef(MCMCIntervalPlot,1) /// Class containing the results of the MCMCCalculator
120  };
121 }
122 
123 #endif
This class provides simple and straightforward utilities to plot a MCMCInterval object.
const char Option_t
Definition: RtypesCore.h:62
int Int_t
Definition: RtypesCore.h:41
void Draw(const Option_t *options=NULL)
bool Bool_t
Definition: RtypesCore.h:59
void DrawShortestInterval(const Option_t *options=NULL)
void DrawInterval(const Option_t *options=NULL)
#define ClassDef(name, id)
Definition: Rtypes.h:254
RooPlotable is a 'mix-in' base class that define the standard RooFit plotting and printing methods...
Definition: RooPrintable.h:26
void DrawWeightHist(const Option_t *options=NULL)
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:33
void SetShadeColor(Color_t color)
short Color_t
Definition: RtypesCore.h:79
RooRealVar represents a fundamental (non-derived) real valued object.
Definition: RooRealVar.h:37
void SetMCMCInterval(MCMCInterval &interval)
void * DrawPosteriorKeysProduct(const Option_t *options=NULL)
void SetLineColor(Color_t color)
void SetLineWidth(Int_t width)
void DrawTailFractionInterval(const Option_t *options=NULL)
Generic N-dimensional implementation of a kernel estimation p.d.f.
Definition: RooNDKeysPdf.h:45
RooProduct a RooAbsReal implementation that represent the product of a given set of other RooAbsReal ...
Definition: RooProduct.h:32
void * DrawPosteriorHist(const Option_t *options=NULL, const char *title=NULL, Bool_t scale=kTRUE)
void DrawNLLHist(const Option_t *options=NULL)
Namespace for the RooStats classes.
Definition: Asimov.h:20
RooNDKeysPdf * fPosteriorKeysPdf
void DrawPosterior(const Option_t *options=NULL)
void DrawKeysPdfInterval(const Option_t *options=NULL)
The TH1 histogram class.
Definition: TH1.h:80
void DrawChainScatter(RooRealVar &xVar, RooRealVar &yVar)
void DrawParameterVsTime(RooRealVar &param)
virtual ~MCMCIntervalPlot()
Destructor of SamplingDistribution.
void SetShowBurnIn(Bool_t showBurnIn)
void DrawHistInterval(const Option_t *options=NULL)
A Graph is a graphics object made of two arrays X and Y with npoints each.
Definition: TGraph.h:53
#define NULL
Definition: Rtypes.h:82
void * DrawPosteriorKeysPdf(const Option_t *options=NULL)
MCMCInterval is a concrete implementation of the RooStats::ConfInterval interface.
Definition: MCMCInterval.h:88
const Bool_t kTRUE
Definition: Rtypes.h:91