Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooPlot.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * File: $Id: RooPlot.h,v 1.37 2007/06/18 11:52:41 wouter Exp $
5 * Authors: *
6 * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
7 * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
8 * *
9 * Copyright (c) 2000-2005, Regents of the University of California *
10 * and Stanford University. All rights reserved. *
11 * *
12 * Redistribution and use in source and binary forms, *
13 * with or without modification, are permitted according to the terms *
14 * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
15 *****************************************************************************/
16#ifndef ROO_PLOT
17#define ROO_PLOT
18
19#include "RooPrintable.h"
20#include "TNamed.h"
21
22#include <memory>
23#include <cfloat>
24
25class TH1 ;
26
27class RooAbsReal;
29class RooArgSet ;
30class RooHist;
31class RooCurve ;
32class RooPlotable;
33class TDirectory ;
34class TAttLine;
35class TAttFill;
36class TAttMarker;
37class TAttText;
38class TClass ;
39class TAxis;
40class TBrowser ;
41class TLegend;
42
43class RooPlot : public TNamed, public RooPrintable {
44public:
45 using Items = std::vector<std::pair<TObject*,std::string>>;
46
47 RooPlot() ;
48 RooPlot(const char* name, const char* title, const RooAbsRealLValue &var, double xmin, double xmax, Int_t nBins) ;
49 RooPlot(const RooAbsRealLValue &var, double xmin, double xmax, Int_t nBins);
50 RooPlot(double xmin, double xmax);
51 RooPlot(double xmin, double xmax, double ymin, double ymax);
52 RooPlot(const RooAbsRealLValue &var1, const RooAbsRealLValue &var2);
53 RooPlot(const RooAbsRealLValue &var1, const RooAbsRealLValue &var2,
54 double xmin, double xmax, double ymin, double ymax);
55 ~RooPlot() override;
56
57 RooPlot(const RooPlot& other) = delete; // cannot be copied
58
59 static RooPlot* frame(const RooAbsRealLValue &var, double xmin, double xmax, Int_t nBins);
60 static RooPlot* frameWithLabels(const RooAbsRealLValue &var);
61
62 RooPlot* emptyClone(const char* name) ;
63
64 // implement the TH1 interface
65 void Draw(Option_t *options= nullptr) override;
66
67 // forwarding of relevant TH1 interface
68 TAxis* GetXaxis() const ;
69 TAxis* GetYaxis() const ;
70 Int_t GetNbinsX() const ;
71 Int_t GetNdivisions(Option_t* axis = "X") const ;
72 double GetMinimum(double minval = -FLT_MAX) const ;
73 double GetMaximum(double maxval = FLT_MAX) const ;
74
75 void SetAxisColor(Color_t color = 1, Option_t* axis = "X") ;
76 void SetAxisRange(double xmin, double xmax, Option_t* axis = "X") ;
77 void SetBarOffset(Float_t offset = 0.25) ;
78 void SetBarWidth(Float_t width = 0.5) ;
79 void SetContour(Int_t nlevels, const double* levels = nullptr) ;
80 void SetContourLevel(Int_t level, double value) ;
81 void SetDrawOption(Option_t* option = "") override ;
82 void SetFillAttributes() ;
83 void SetFillColor(Color_t fcolor) ;
84 void SetFillStyle(Style_t fstyle) ;
85 void SetLabelColor(Color_t color = 1, Option_t* axis = "X") ;
86 void SetLabelFont(Style_t font = 62, Option_t* axis = "X") ;
87 void SetLabelOffset(Float_t offset = 0.005, Option_t* axis = "X") ;
88 void SetLabelSize(Float_t size = 0.02, Option_t* axis = "X") ;
89 void SetLineAttributes() ;
90 void SetLineColor(Color_t lcolor) ;
91 void SetLineStyle(Style_t lstyle) ;
92 void SetLineWidth(Width_t lwidth) ;
93 void SetMarkerAttributes() ;
94 void SetMarkerColor(Color_t tcolor = 1) ;
95 void SetMarkerSize(Size_t msize = 1) ;
96 void SetMarkerStyle(Style_t mstyle = 1) ;
97 void SetName(const char *name) override ;
98 void SetTitle(const char *name) override ;
99 void SetNameTitle(const char *name, const char* title) override ;
100 void SetNdivisions(Int_t n = 510, Option_t* axis = "X") ;
101 void SetOption(Option_t* option = " ") ;
102 void SetStats(bool stats = true) ;
103 void SetTickLength(Float_t length = 0.02, Option_t* axis = "X") ;
104 void SetTitleFont(Style_t font = 62, Option_t* axis = "X") ;
105 void SetTitleOffset(Float_t offset = 1, Option_t* axis = "X") ;
106 void SetTitleSize(Float_t size = 0.02, Option_t* axis = "X") ;
107 void SetXTitle(const char* title) ;
108 void SetYTitle(const char* title) ;
109 void SetZTitle(const char* title) ;
110
111 // container management
112 const char* nameOf(Int_t idx) const ;
113 TObject *findObject(const char *name, const TClass* tClass=nullptr) const;
114 TObject* getObject(Int_t idx) const ;
115 Stat_t numItems() const {return _items.size();}
116
117 void addPlotable(RooPlotable *plotable, Option_t *drawOptions= "", bool invisible=false, bool refreshNorm=false);
118 void addObject(TObject* obj, Option_t* drawOptions= "", bool invisible=false);
119 void addTH1(TH1 *hist, Option_t* drawOptions= "", bool invisible=false);
120 std::unique_ptr<TLegend> BuildLegend() const;
121
122 void remove(const char* name=nullptr, bool deleteToo=true) ;
123
124 // ascii printing
125 void printName(std::ostream& os) const override ;
126 void printTitle(std::ostream& os) const override ;
127 void printClassName(std::ostream& os) const override ;
128 void printArgs(std::ostream& os) const override ;
129 void printValue(std::ostream& os) const override ;
130 void printMultiline(std::ostream& os, Int_t content, bool verbose=false, TString indent="") const override ;
131
132 Int_t defaultPrintContents(Option_t* opt) const override ;
133
134 inline void Print(Option_t *options= nullptr) const override {
136 }
137
138 // data member get/set methods
139 inline RooAbsRealLValue *getPlotVar() const { return _plotVar; }
140 ///Return the number of events in the fit range
141 inline double getFitRangeNEvt() const { return _normNumEvts; }
142 double getFitRangeNEvt(double xlo, double xhi) const ;
143 ///Return the bin width that is being used to normalise the PDF
144 inline double getFitRangeBinW() const { return _normBinWidth; }
145 inline double getPadFactor() const { return _padFactor; }
146 inline void setPadFactor(double factor) { if(factor >= 0) _padFactor= factor; }
147 void updateNormVars(const RooArgSet &vars);
148 const RooArgSet *getNormVars() const { return _normVars; }
149
150 // get attributes of contained objects
151 TAttLine *getAttLine(const char *name=nullptr) const;
152 TAttFill *getAttFill(const char *name=nullptr) const;
153 TAttMarker *getAttMarker(const char *name=nullptr) const;
154 TAttText *getAttText(const char *name=nullptr) const;
155
156 // Convenient type-safe accessors
157 RooCurve* getCurve(const char* name=nullptr) const ;
158 RooHist* getHist(const char* name=nullptr) const ;
159
160
161 // rearrange drawing order of contained objects
162 bool drawBefore(const char *before, const char *target);
163 bool drawAfter(const char *after, const char *target);
164
165 // get/set drawing options for contained objects
166 TString getDrawOptions(const char *name) const;
167 bool setDrawOptions(const char *name, TString options);
168
169 bool getInvisible(const char* name) const ;
170 void setInvisible(const char* name, bool flag=true) ;
171
172 virtual void SetMaximum(double maximum = -1111) ;
173 virtual void SetMinimum(double minimum = -1111) ;
174
175 ///Shortcut for RooPlot::chiSquare(const char* pdfname, const char* histname, int nFitParam=nullptr)
176 double chiSquare(int nFitParam=0) const { return chiSquare(nullptr,nullptr,nFitParam) ; }
177 double chiSquare(const char* pdfname, const char* histname, int nFitParam=0) const ;
178
179 RooHist* residHist(const char* histname=nullptr, const char* pdfname=nullptr,bool normalize=false, bool useAverage=true) const ;
180 ///Uses residHist() and sets normalize=true
181 RooHist* pullHist(const char* histname=nullptr, const char* pdfname=nullptr, bool useAverage=true) const
182 { return residHist(histname,pdfname,true,useAverage); }
183
184 void Browse(TBrowser *b) override ;
185
186 /// \copydoc AddDirectoryStatus()
187 static bool addDirectoryStatus() ;
188 /// \copydoc AddDirectory()
189 static bool setAddDirectoryStatus(bool flag) ;
190
191 /// Configure whether new instances of RooPlot will add themselves to `gDirectory`.
192 /// Like TH1::AddDirectory().
193 static void AddDirectory(bool add=true) {
195 }
196 /// Query whether new instances of RooPlot will add themselves to `gDirectory`.
197 /// When a file has been opened before a RooPlot instance is created,
198 /// this instance will be associated to the file. Closing the file will e.g.
199 /// write the instance to the file, and then delete it.
200 /// Like TH1::AddDirectoryStatus().
201 static bool AddDirectoryStatus() {
202 return addDirectoryStatus();
203 }
204
205 void SetDirectory(TDirectory *dir);
206
207 static void fillItemsFromTList(Items & items, TList const& tlist);
208
210
211protected:
212
213 class DrawOpt {
214 public:
215
216 DrawOpt(const char* _rawOpt=nullptr) : invisible(false) { drawOptions[0] = 0 ; initialize(_rawOpt) ; }
217 void initialize(const char* _rawOpt) ;
218 const char* rawOpt() const ;
219
220 char drawOptions[128] ;
222 } ;
223
224
225 void initialize();
226 TString histName() const ;
227 Items::iterator findItem(std::string const& name);
228 Items::const_iterator findItem(std::string const& name) const;
229
230 void updateYAxis(double ymin, double ymax, const char *label= "");
231 void updateFitRangeNorm(const TH1* hist);
232 void updateFitRangeNorm(const RooPlotable* rp, bool refreshNorm=false);
233
234 TH1* _hist = nullptr; ///< Histogram that we uses as basis for drawing the content
235 Items _items; ///< A list of the items we contain.
236 double _padFactor; ///< Scale our y-axis to _padFactor of our maximum contents.
237 RooAbsRealLValue *_plotVar = nullptr; ///< The variable we are plotting.
238 RooArgSet *_plotVarSet = nullptr; ///< A list owning the cloned tree nodes of the plotVarClone
239 RooArgSet *_normVars = nullptr; ///< Variables that PDF plots should be normalized over
240
241 const RooPlotable* _normObj = nullptr; ///<! Pointer to normalization object ;
242 double _normNumEvts = 0; ///< Number of events in histogram (for normalization)
243 double _normBinWidth = 0; ///< Histogram bin width (for normalization)
244
245 double _defYmin = 1e-5; ///< Default minimum for Yaxis (as calculated from contents)
246 double _defYmax = 1.0; ///< Default maximum for Yaxis (as calculated from contents)
247
248 TDirectory* _dir = nullptr; ///<! non-persistent
249
250 static bool _addDirStatus ; ///< static flag controlling AutoDirectoryAdd feature
251
252 ClassDefOverride(RooPlot,3) // Plot frame and container for graphics objects
253};
254
255#endif
#define b(i)
Definition RSha256.hxx:100
#define e(i)
Definition RSha256.hxx:103
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
short Style_t
Definition RtypesCore.h:89
short Color_t
Definition RtypesCore.h:92
float Size_t
Definition RtypesCore.h:96
short Width_t
Definition RtypesCore.h:91
float Float_t
Definition RtypesCore.h:57
const char Option_t
Definition RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
static void indent(ostringstream &buf, int indent_level)
Option_t Option_t option
Option_t Option_t SetLineWidth
Option_t Option_t SetFillStyle
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 winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h offset
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 winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t target
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 winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h length
Option_t Option_t SetLineColor
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Option_t Option_t SetFillColor
Option_t Option_t SetMarkerStyle
Option_t Option_t width
char name[80]
Definition TGX11.cxx:110
float xmin
float ymin
float xmax
float ymax
Abstract base class for objects that represent a real value that may appear on the left hand side of ...
Abstract base class for objects that represent a real value and implements functionality common to al...
Definition RooAbsReal.h:59
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:55
One-dimensional graphical representation of a real-valued function.
Definition RooCurve.h:36
Graphical representation of binned data based on the TGraphAsymmErrors class.
Definition RooHist.h:29
char drawOptions[128]
Definition RooPlot.h:220
DrawOpt(const char *_rawOpt=nullptr)
Definition RooPlot.h:216
const char * rawOpt() const
Return the raw draw options.
Definition RooPlot.cxx:1197
Plot frame and a container for graphics objects within that frame.
Definition RooPlot.h:43
RooPlot()
Default constructor coverity[UNINIT_CTOR].
Definition RooPlot.cxx:87
void SetName(const char *name) override
Set the name of the RooPlot to 'name'.
Definition RooPlot.cxx:1233
void SetAxisColor(Color_t color=1, Option_t *axis="X")
Definition RooPlot.cxx:1288
void remove(const char *name=nullptr, bool deleteToo=true)
Remove object with given name, or last object added if no name is given.
Definition RooPlot.cxx:880
RooPlot(const RooPlot &other)=delete
void SetDrawOption(Option_t *option="") override
Definition RooPlot.cxx:1300
void updateYAxis(double ymin, double ymax, const char *label="")
Update our y-axis limits to accommodate an object whose spread in y is (ymin,ymax).
Definition RooPlot.cxx:617
Items _items
A list of the items we contain.
Definition RooPlot.h:235
void SetMarkerSize(Size_t msize=1)
Definition RooPlot.cxx:1328
static RooPlot * frame(const RooAbsRealLValue &var, double xmin, double xmax, Int_t nBins)
Create a new frame for a given variable in x.
Definition RooPlot.cxx:237
const RooPlotable * _normObj
! Pointer to normalization object ;
Definition RooPlot.h:241
double _normNumEvts
Number of events in histogram (for normalization)
Definition RooPlot.h:242
bool drawBefore(const char *before, const char *target)
Change the order in which our contained objects are drawn so that the target object is drawn just bef...
Definition RooPlot.cxx:918
bool getInvisible(const char *name) const
Returns true of object with given name is set to be invisible.
Definition RooPlot.cxx:1020
void SetTitle(const char *name) override
Set the title of the RooPlot to 'title'.
Definition RooPlot.cxx:1255
RooArgSet * _normVars
Variables that PDF plots should be normalized over.
Definition RooPlot.h:239
void addObject(TObject *obj, Option_t *drawOptions="", bool invisible=false)
Add a generic object to this plot.
Definition RooPlot.cxx:378
void addTH1(TH1 *hist, Option_t *drawOptions="", bool invisible=false)
Add a TH1 histogram object to this plot.
Definition RooPlot.cxx:397
double _padFactor
Scale our y-axis to _padFactor of our maximum contents.
Definition RooPlot.h:236
void SetMarkerColor(Color_t tcolor=1)
Definition RooPlot.cxx:1326
void printMultiline(std::ostream &os, Int_t content, bool verbose=false, TString indent="") const override
Frame detailed printing.
Definition RooPlot.cxx:750
void SetXTitle(const char *title)
Definition RooPlot.cxx:1346
RooArgSet * _plotVarSet
A list owning the cloned tree nodes of the plotVarClone.
Definition RooPlot.h:238
void SetNdivisions(Int_t n=510, Option_t *axis="X")
Definition RooPlot.cxx:1332
TDirectory * _dir
! non-persistent
Definition RooPlot.h:248
TString histName() const
Construct automatic name of internal TH1.
Definition RooPlot.cxx:313
TH1 * _hist
Histogram that we uses as basis for drawing the content.
Definition RooPlot.h:234
void printName(std::ostream &os) const override
Print frame name.
Definition RooPlot.cxx:681
TString getDrawOptions(const char *name) const
Return the Draw() options registered for the named object.
Definition RooPlot.cxx:992
double _normBinWidth
Histogram bin width (for normalization)
Definition RooPlot.h:243
void SetZTitle(const char *title)
Definition RooPlot.cxx:1350
void setInvisible(const char *name, bool flag=true)
If flag is true object with 'name' is set to be invisible i.e.
Definition RooPlot.cxx:1033
void SetContour(Int_t nlevels, const double *levels=nullptr)
Definition RooPlot.cxx:1296
void printClassName(std::ostream &os) const override
Print frame class name.
Definition RooPlot.cxx:699
bool setDrawOptions(const char *name, TString options)
Register the specified drawing options for the named object.
Definition RooPlot.cxx:1005
TObject * findObject(const char *name, const TClass *tClass=nullptr) const
Find the named object in our list of items and return a pointer to it.
Definition RooPlot.cxx:954
void SetStats(bool stats=true)
Like TH1::SetStats(), but statistics boxes are off by default in RooFit.
Definition RooPlot.cxx:1336
double getFitRangeNEvt() const
Return the number of events in the fit range.
Definition RooPlot.h:141
virtual void SetMinimum(double minimum=-1111)
Set minimum value of Y axis.
Definition RooPlot.cxx:1059
const RooArgSet * getNormVars() const
Definition RooPlot.h:148
std::vector< std::pair< TObject *, std::string > > Items
Definition RooPlot.h:45
double GetMaximum(double maxval=FLT_MAX) const
Definition RooPlot.cxx:1284
void Print(Option_t *options=nullptr) const override
This method must be overridden when a class wants to print itself.
Definition RooPlot.h:134
TAttLine * getAttLine(const char *name=nullptr) const
Return a pointer to the line attributes of the named object in this plot, or zero if the named object...
Definition RooPlot.cxx:819
bool drawAfter(const char *after, const char *target)
Change the order in which our contained objects are drawn so that the target object is drawn just aft...
Definition RooPlot.cxx:933
RooAbsRealLValue * _plotVar
The variable we are plotting.
Definition RooPlot.h:237
void SetDirectory(TDirectory *dir)
Set the directory that this plot is associated to.
Definition RooPlot.cxx:345
~RooPlot() override
Destructor.
Definition RooPlot.cxx:326
Stat_t numItems() const
Definition RooPlot.h:115
void SetLabelOffset(Float_t offset=0.005, Option_t *axis="X")
Definition RooPlot.cxx:1312
TAttFill * getAttFill(const char *name=nullptr) const
Return a pointer to the fill attributes of the named object in this plot, or zero if the named object...
Definition RooPlot.cxx:829
void printTitle(std::ostream &os) const override
Print frame title.
Definition RooPlot.cxx:690
void SetTickLength(Float_t length=0.02, Option_t *axis="X")
Definition RooPlot.cxx:1338
void SetFillAttributes()
Definition RooPlot.cxx:1302
void SetContourLevel(Int_t level, double value)
Definition RooPlot.cxx:1298
static bool addDirectoryStatus()
Query whether new instances of RooPlot will add themselves to gDirectory.
Definition RooPlot.cxx:79
void SetLabelSize(Float_t size=0.02, Option_t *axis="X")
Definition RooPlot.cxx:1314
double chiSquare(int nFitParam=0) const
Shortcut for RooPlot::chiSquare(const char* pdfname, const char* histname, int nFitParam=nullptr)
Definition RooPlot.h:176
Items::iterator findItem(std::string const &name)
Definition RooPlot.cxx:973
void SetOption(Option_t *option=" ")
Definition RooPlot.cxx:1334
TObject * getObject(Int_t idx) const
Return the name of the object at slot 'idx' in this RooPlot.
Definition RooPlot.cxx:803
virtual void SetMaximum(double maximum=-1111)
Set maximum value of Y axis.
Definition RooPlot.cxx:1049
TAxis * GetYaxis() const
Definition RooPlot.cxx:1276
RooAbsRealLValue * getPlotVar() const
Definition RooPlot.h:139
void SetLabelFont(Style_t font=62, Option_t *axis="X")
Definition RooPlot.cxx:1310
void Browse(TBrowser *b) override
Plot RooPlot when double-clicked in browser.
Definition RooPlot.cxx:1358
double _defYmax
Default maximum for Yaxis (as calculated from contents)
Definition RooPlot.h:246
void SetLineStyle(Style_t lstyle)
Definition RooPlot.cxx:1320
TAttMarker * getAttMarker(const char *name=nullptr) const
Return a pointer to the marker attributes of the named object in this plot, or zero if the named obje...
Definition RooPlot.cxx:839
void SetTitleFont(Style_t font=62, Option_t *axis="X")
Definition RooPlot.cxx:1340
void SetAxisRange(double xmin, double xmax, Option_t *axis="X")
Definition RooPlot.cxx:1290
TAxis * GetXaxis() const
Definition RooPlot.cxx:1274
const char * nameOf(Int_t idx) const
Return the name of the object at slot 'idx' in this RooPlot.
Definition RooPlot.cxx:787
void updateNormVars(const RooArgSet &vars)
Install the given set of observables are reference normalization variables for this frame.
Definition RooPlot.cxx:363
RooHist * residHist(const char *histname=nullptr, const char *pdfname=nullptr, bool normalize=false, bool useAverage=true) const
Return a RooHist (derives from TGraphAsymErrors) containing the residuals of a histogram.
Definition RooPlot.cxx:1113
RooPlot * emptyClone(const char *name)
Return empty clone of current RooPlot.
Definition RooPlot.cxx:283
void SetMarkerAttributes()
Definition RooPlot.cxx:1324
void createInternalPlotVarClone()
Replaces the pointer to the plot variable with a pointer to a clone of the plot variable that is owne...
Definition RooPlot.cxx:1449
void SetNameTitle(const char *name, const char *title) override
Set the name and title of the RooPlot to 'name' and 'title'.
Definition RooPlot.cxx:1244
void setPadFactor(double factor)
Definition RooPlot.h:146
Int_t defaultPrintContents(Option_t *opt) const override
Define default print options, for a given print style.
Definition RooPlot.cxx:1266
RooCurve * getCurve(const char *name=nullptr) const
Return a RooCurve pointer of the named object in this plot, or zero if the named object does not exis...
Definition RooPlot.cxx:860
RooHist * pullHist(const char *histname=nullptr, const char *pdfname=nullptr, bool useAverage=true) const
Uses residHist() and sets normalize=true.
Definition RooPlot.h:181
static bool setAddDirectoryStatus(bool flag)
Configure whether new instances of RooPlot will add themselves to gDirectory.
Definition RooPlot.cxx:80
TAttText * getAttText(const char *name=nullptr) const
Return a pointer to the text attributes of the named object in this plot, or zero if the named object...
Definition RooPlot.cxx:849
void SetLabelColor(Color_t color=1, Option_t *axis="X")
Definition RooPlot.cxx:1308
Int_t GetNbinsX() const
Definition RooPlot.cxx:1278
static void fillItemsFromTList(Items &items, TList const &tlist)
RooFit-internal function for backwards compatibility.
Definition RooPlot.cxx:1436
void SetLineAttributes()
Definition RooPlot.cxx:1316
static bool _addDirStatus
static flag controlling AutoDirectoryAdd feature
Definition RooPlot.h:250
void printValue(std::ostream &os) const override
Print frame arguments.
Definition RooPlot.cxx:722
void SetYTitle(const char *title)
Definition RooPlot.cxx:1348
double getPadFactor() const
Definition RooPlot.h:145
static void AddDirectory(bool add=true)
Configure whether new instances of RooPlot will add themselves to gDirectory.
Definition RooPlot.h:193
void printArgs(std::ostream &os) const override
Interface for printing of object arguments.
Definition RooPlot.cxx:708
std::unique_ptr< TLegend > BuildLegend() const
Build a legend that contains all objects that have been drawn on the plot.
Definition RooPlot.cxx:1424
RooHist * getHist(const char *name=nullptr) const
Return a RooCurve pointer of the named object in this plot, or zero if the named object does not exis...
Definition RooPlot.cxx:870
void updateFitRangeNorm(const TH1 *hist)
Update our plot normalization over our plot variable's fit range, which will be determined by the fir...
Definition RooPlot.cxx:562
void SetTitleSize(Float_t size=0.02, Option_t *axis="X")
Definition RooPlot.cxx:1344
double _defYmin
Default minimum for Yaxis (as calculated from contents)
Definition RooPlot.h:245
void SetBarOffset(Float_t offset=0.25)
Definition RooPlot.cxx:1292
void SetBarWidth(Float_t width=0.5)
Definition RooPlot.cxx:1294
Int_t GetNdivisions(Option_t *axis="X") const
Definition RooPlot.cxx:1280
void addPlotable(RooPlotable *plotable, Option_t *drawOptions="", bool invisible=false, bool refreshNorm=false)
Add the specified plotable object to our plot.
Definition RooPlot.cxx:528
void initialize()
Perform initialization that is common to all constructors.
Definition RooPlot.cxx:294
static RooPlot * frameWithLabels(const RooAbsRealLValue &var)
Create a new frame for a given variable in x, adding bin labels.
Definition RooPlot.cxx:249
void SetTitleOffset(Float_t offset=1, Option_t *axis="X")
Definition RooPlot.cxx:1342
static bool AddDirectoryStatus()
Query whether new instances of RooPlot will add themselves to gDirectory.
Definition RooPlot.h:201
double GetMinimum(double minval=-FLT_MAX) const
Definition RooPlot.cxx:1282
double getFitRangeBinW() const
Return the bin width that is being used to normalise the PDF.
Definition RooPlot.h:144
Class RooPotable is a base class for objects that can be inserted into RooPlots and take advantage of...
Definition RooPlotable.h:26
A 'mix-in' base class that define the standard RooFit plotting and printing methods.
virtual StyleOption defaultPrintStyle(Option_t *opt) const
static std::ostream & defaultPrintStream(std::ostream *os=nullptr)
Return a reference to the current default stream to use in Print().
virtual void printStream(std::ostream &os, Int_t contents, StyleOption style, TString indent="") const
Print description of object on ostream, printing contents set by contents integer,...
Fill Area Attributes class.
Definition TAttFill.h:19
Line Attributes class.
Definition TAttLine.h:18
Marker Attributes class.
Definition TAttMarker.h:19
Text Attributes class.
Definition TAttText.h:18
Class to manage histogram axis.
Definition TAxis.h:31
Using a TBrowser one can browse all ROOT objects.
Definition TBrowser.h:37
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition TClass.h:81
Describe directory structure in memory.
Definition TDirectory.h:45
TH1 is the base class of all histogram classes in ROOT.
Definition TH1.h:59
This class displays a legend box (TPaveText) containing several legend entries.
Definition TLegend.h:23
A doubly linked list.
Definition TList.h:38
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
Basic string class.
Definition TString.h:139
const Int_t n
Definition legend1.C:16
th1 Draw()