Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
28namespace RooStats {
29
31
32 public:
34
36
37 /// Destructor of SamplingDistribution
39
40
41 /// returned plotted object (RooPlot or histograms)
42 TObject * GetPlottedObject() const { return fPlotObject; }
43
45 void SetPlotParameters(const RooArgSet *params) ;
46
47
48 /// set plot range (for 1D plot)
49 void SetRange(double x1, double x2) { fXmin = x1; fXmax = x2; }
50 /// set plot range (for 2D plot)
51 void SetRange(double x1, double y1, double x2, double y2) {
52 fXmin = x1; fXmax = x2;
53 fYmin = y1; fYmax = y2;
54 }
55
56 ///set plot precision (when drawing a RooPlot)
57 void SetPrecision(double eps) { fPrecision = eps; }
58 /// set the line color for the 1D interval lines or contours (2D)
59 void SetLineColor(const Color_t color) {fLineColor = color;}
60 /// set the fill contour color
62 /// set the fill contour color
63 void SetContourColor(const Color_t color) {fColor = color;}
64 void SetMaximum(const Double_t theMaximum) {fMaximum = theMaximum;}
65 void SetNPoints(Int_t np) { fNPoints = np; }
66
67
68 /// draw the likelihood interval or contour
69 /// for the 1D case a RooPlot is drawn by default of the profiled Log-Likelihood ratio
70 /// if option "TF1" is used the objects is drawn using a TF1 scanning the LL function in a
71 /// grid of the setetd points (by default
72 /// the TF1 can be costumized by setting maximum and the number of points to scan
73 void Draw(const Option_t *options=0);
74
75 private:
76
77 Color_t fColor; /// color for the contour (for 2D) or function (in 1D)
78 Style_t fFillStyle; /// fill style for contours
79 Color_t fLineColor; /// line color for the interval (1D) or for other contours (2D)
81 Int_t fNPoints; /// number of points used to scan the PL
82
83 Double_t fMaximum; /// function maximum
84 // ranges for plots
89 Double_t fPrecision; /// RooCurve precision
90
92
94 TObject * fPlotObject; /// plotted object
95
96
97 protected:
98
99 ClassDef(LikelihoodIntervalPlot,2) /// Class containing the results of the IntervalCalculator
100 };
101}
102
103#endif
static const double x2[5]
static const double x1[5]
double Double_t
Definition RtypesCore.h:59
short Color_t
Definition RtypesCore.h:92
short Style_t
Definition RtypesCore.h:89
const char Option_t
Definition RtypesCore.h:66
#define ClassDef(name, id)
Definition Rtypes.h:325
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:35
RooPlotable is a 'mix-in' base class that define the standard RooFit plotting and printing methods.
This class provides simple and straightforward utilities to plot a LikelihoodInterval object.
Double_t fMaximum
number of points used to scan the PL
virtual ~LikelihoodIntervalPlot()
Destructor of SamplingDistribution.
Int_t fNdimPlot
line color for the interval (1D) or for other contours (2D)
void SetPlotParameters(const RooArgSet *params)
void SetFillStyle(const Style_t style)
set the fill contour color
Style_t fFillStyle
color for the contour (for 2D) or function (in 1D)
void SetLineColor(const Color_t color)
set the line color for the 1D interval lines or contours (2D)
void SetRange(double x1, double x2)
set plot range (for 1D plot)
void SetMaximum(const Double_t theMaximum)
LikelihoodIntervalPlot()
LikelihoodIntervalPlot default constructor with default parameters.
void SetRange(double x1, double y1, double x2, double y2)
set plot range (for 2D plot)
void SetPrecision(double eps)
set plot precision (when drawing a RooPlot)
LikelihoodInterval * fInterval
RooCurve precision.
void SetLikelihoodInterval(LikelihoodInterval *theInterval)
TObject * GetPlottedObject() const
returned plotted object (RooPlot or histograms)
Color_t fLineColor
fill style for contours
void SetContourColor(const Color_t color)
set the fill contour color
LikelihoodInterval is a concrete implementation of the RooStats::ConfInterval interface.
The TNamed class is the base class for all named ROOT classes.
Definition TNamed.h:29
Mother of all ROOT objects.
Definition TObject.h:41
Namespace for the RooStats classes.
Definition Asimov.h:19
TCanvas * style()
Definition style.C:1
th1 Draw()