ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
LikelihoodIntervalPlot.h
Go to the documentation of this file.
1 // @(#)root/roostats:$Id$
2 
3 /*************************************************************************
4  * Project: RooStats *
5  * Package: RooFit/RooStats *
6  * Authors: *
7  * Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke *
8  *************************************************************************
9  * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
10  * All rights reserved. *
11  * *
12  * For the licensing terms see $ROOTSYS/LICENSE. *
13  * For the list of contributors see $ROOTSYS/README/CREDITS. *
14  *************************************************************************/
15 
16 #ifndef ROOSTATS_LikelihoodIntervalPlot
17 #define ROOSTATS_LikelihoodIntervalPlot
18 
19 #include "RooPrintable.h"
20 #include "RooArgSet.h"
21 
22 #include "TNamed.h"
23 
24 #include "TH2F.h"
25 
27 
28 namespace RooStats {
29 
30 /**
31 
32  \ingroup Roostats
33 
34  This class provides simple and straightforward utilities to plot a LikelihoodInterval
35  object.
36 
37 */
38 
39 
40  class LikelihoodIntervalPlot : public TNamed, public RooPrintable {
41 
42  public:
44 
46 
47  /// Destructor of SamplingDistribution
48  virtual ~LikelihoodIntervalPlot();
49 
50 
51  /// returned plotted object (RooPlot or histograms)
52  TObject * GetPlottedObject() const { return fPlotObject; }
53 
54  void SetLikelihoodInterval(LikelihoodInterval* theInterval);
55  void SetPlotParameters(const RooArgSet *params) ;
56 
57 
58  /// set plot range (for 1D plot)
59  void SetRange(double x1, double x2) { fXmin = x1; fXmax = x2; }
60  /// set plot range (for 2D plot)
61  void SetRange(double x1, double y1, double x2, double y2) {
62  fXmin = x1; fXmax = x2;
63  fYmin = y1; fYmax = y2;
64  }
65 
66  ///set plot precision (when drawing a RooPlot)
67  void SetPrecision(double eps) { fPrecision = eps; }
68  /// set the line color for the 1D interval lines or contours (2D)
69  void SetLineColor(const Color_t color) {fLineColor = color;}
70  /// set the fill contour color
72  /// set the fill contour color
73  void SetContourColor(const Color_t color) {fColor = color;}
74  void SetMaximum(const Double_t theMaximum) {fMaximum = theMaximum;}
75  void SetNPoints(Int_t np) { fNPoints = np; }
76 
77 
78  /// draw the likelihood interval or contour
79  /// for the 1D case a RooPlot is drawn by default of the profiled Log-Likelihood ratio
80  /// if option "TF1" is used the objects is drawn using a TF1 scanning the LL function in a
81  /// grid of the setetd points (by default
82  /// the TF1 can be costumized by setting maximum and the number of points to scan
83  void Draw(const Option_t *options=0);
84 
85  private:
86 
87  Color_t fColor; /// color for the contour (for 2D) or function (in 1D)
88  Style_t fFillStyle; /// fill style for contours
89  Color_t fLineColor; /// line color for the interval (1D) or for other contours (2D)
91  Int_t fNPoints; /// number of points used to scan the PL
92 
93  Double_t fMaximum; /// function maximum
94  // ranges for plots
99  Double_t fPrecision; /// RooCurve precision
100 
102 
104  TObject * fPlotObject; /// plotted object
105 
106 
107  protected:
108 
109  ClassDef(LikelihoodIntervalPlot,2) /// Class containing the results of the IntervalCalculator
110  };
111 }
112 
113 #endif
void SetLineColor(const Color_t color)
set the line color for the 1D interval lines or contours (2D)
Style_t fFillStyle
color for the contour (for 2D) or function (in 1D)
virtual ~LikelihoodIntervalPlot()
Destructor of SamplingDistribution.
void Draw(const Option_t *options=0)
draw the likelihood interval or contour for the 1D case a RooPlot is drawn by default of the profiled...
void SetFillStyle(const Style_t style)
set the fill contour color
short Style_t
Definition: RtypesCore.h:76
void SetMaximum(const Double_t theMaximum)
LikelihoodInterval is a concrete implementation of the RooStats::ConfInterval interface.
void SetPrecision(double eps)
set plot precision (when drawing a RooPlot)
const char Option_t
Definition: RtypesCore.h:62
This class provides simple and straightforward utilities to plot a LikelihoodInterval object...
Color_t fLineColor
fill style for contours
int Int_t
Definition: RtypesCore.h:41
void SetRange(double x1, double y1, double x2, double y2)
set plot range (for 2D plot)
static const double x2[5]
#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
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:33
tuple np
Definition: multifit.py:30
LikelihoodInterval * fInterval
RooCurve precision.
short Color_t
Definition: RtypesCore.h:79
Int_t fNdimPlot
line color for the interval (1D) or for other contours (2D)
void SetContourColor(const Color_t color)
set the fill contour color
LikelihoodIntervalPlot()
LikelihoodIntervalPlot default constructor with default parameters.
void SetRange(double x1, double x2)
set plot range (for 1D plot)
static const double x1[5]
double Double_t
Definition: RtypesCore.h:55
TCanvas * style()
Definition: style.C:1
Double_t fMaximum
number of points used to scan the PL
Mother of all ROOT objects.
Definition: TObject.h:58
void SetLikelihoodInterval(LikelihoodInterval *theInterval)
void SetPlotParameters(const RooArgSet *params)
TObject * GetPlottedObject() const
returned plotted object (RooPlot or histograms)