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 /// returned plotted object (RooPlot or histograms)
38 TObject * GetPlottedObject() const { return fPlotObject; }
39
41 void SetPlotParameters(const RooArgSet *params) ;
42
43
44 /// set plot range (for 1D plot)
45 void SetRange(double x1, double x2) { fXmin = x1; fXmax = x2; }
46 /// set plot range (for 2D plot)
47 void SetRange(double x1, double y1, double x2, double y2) {
48 fXmin = x1; fXmax = x2;
49 fYmin = y1; fYmax = y2;
50 }
51
52 ///set plot precision (when drawing a RooPlot)
53 void SetPrecision(double eps) { fPrecision = eps; }
54 /// set the line color for the 1D interval lines or contours (2D)
55 void SetLineColor(const Color_t color) {fLineColor = color;}
56 /// set the fill contour color
58 /// set the fill contour color
59 void SetContourColor(const Color_t color) {fColor = color;}
60 void SetMaximum(const double theMaximum) {fMaximum = theMaximum;}
62
63
64 /// draw the likelihood interval or contour
65 /// for the 1D case a RooPlot is drawn by default of the profiled Log-Likelihood ratio
66 /// if option "TF1" is used the objects are drawn using a TF1 scanning the LL function in a
67 /// grid of the set points (by default
68 /// the TF1 can be customized by setting maximum and the number of points to scan
69 void Draw(const Option_t *options=nullptr) override;
70
71 private:
72 Color_t fColor = 0; ///< color for the contour (for 2D) or function (in 1D)
73 Style_t fFillStyle = 4050; ///< fill style for contours, half transparent by default
74 Color_t fLineColor = 0; ///< line color for the interval (1D) or for other contours (2D)
76 Int_t fNPoints = 0; ///< number of points used to scan the PL, default depends if 1D or 2D
77
78 double fMaximum = -1; ///< function maximum
79 // ranges for plots, default is variable range
80 double fXmin = 0;
81 double fXmax = -1;
82 double fYmin = 0;
83 double fYmax = -1;
84 double fPrecision = -1; ///< RooCurve precision, use default in case of -1
85
87
89 TObject *fPlotObject = nullptr; ///< plotted object
90
91 protected:
92
93 ClassDefOverride(LikelihoodIntervalPlot,2) // Class containing the results of the IntervalCalculator
94 };
95}
96
97#endif
short Style_t
Definition RtypesCore.h:89
short Color_t
Definition RtypesCore.h:92
const char Option_t
Definition RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t np
Option_t Option_t TPoint TPoint const char x2
Option_t Option_t TPoint TPoint const char x1
Option_t Option_t TPoint TPoint const char y2
Option_t Option_t style
Option_t Option_t TPoint TPoint const char y1
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:55
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.
Color_t fColor
color for the contour (for 2D) or function (in 1D)
void SetPlotParameters(const RooArgSet *params)
void SetFillStyle(const Style_t style)
set the fill contour color
Int_t fNPoints
number of points used to scan the PL, default depends if 1D or 2D
Style_t fFillStyle
fill style for contours, half transparent by default
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)
LikelihoodIntervalPlot()
LikelihoodIntervalPlot default constructor with default parameters.
double fPrecision
RooCurve precision, use default in case of -1.
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)
void SetMaximum(const double theMaximum)
void SetLikelihoodInterval(LikelihoodInterval *theInterval)
TObject * GetPlottedObject() const
returned plotted object (RooPlot or histograms)
Color_t fLineColor
line color for the interval (1D) or for other contours (2D)
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
th1 Draw()