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 "RooList.h"
20#include "RooPrintable.h"
21#include "TNamed.h"
22
23#include <memory>
24#include <float.h>
25
26class TH1 ;
27
28class RooAbsReal;
30class RooArgSet ;
31class RooHist;
32class RooCurve ;
33class RooPlotable;
34class TDirectory ;
35class TAttLine;
36class TAttFill;
37class TAttMarker;
38class TAttText;
39class TClass ;
40class TAxis;
41class TBrowser ;
42class TLegend;
43
44class RooPlot : public TNamed, public RooPrintable {
45public:
46 RooPlot() ;
47 RooPlot(const char* name, const char* title, const RooAbsRealLValue &var, Double_t xmin, Double_t xmax, Int_t nBins) ;
51 RooPlot(const RooAbsRealLValue &var1, const RooAbsRealLValue &var2);
52 RooPlot(const RooAbsRealLValue &var1, const RooAbsRealLValue &var2,
54 virtual ~RooPlot();
55
56 static RooPlot* frame(const RooAbsRealLValue &var, Double_t xmin, Double_t xmax, Int_t nBins);
57 static RooPlot* frameWithLabels(const RooAbsRealLValue &var);
58
59 RooPlot* emptyClone(const char* name) ;
60
61 // implement the TH1 interface
62 virtual void Draw(Option_t *options= 0);
63
64 // forwarding of relevant TH1 interface
65 TAxis* GetXaxis() const ;
66 TAxis* GetYaxis() const ;
67 Int_t GetNbinsX() const ;
68 Int_t GetNdivisions(Option_t* axis = "X") const ;
69 Double_t GetMinimum(Double_t minval = -FLT_MAX) const ;
70 Double_t GetMaximum(Double_t maxval = FLT_MAX) const ;
71
72 void SetAxisColor(Color_t color = 1, Option_t* axis = "X") ;
73 void SetAxisRange(Double_t xmin, Double_t xmax, Option_t* axis = "X") ;
74 void SetBarOffset(Float_t offset = 0.25) ;
75 void SetBarWidth(Float_t width = 0.5) ;
76 void SetContour(Int_t nlevels, const Double_t* levels = 0) ;
77 void SetContourLevel(Int_t level, Double_t value) ;
78 void SetDrawOption(Option_t* option = "") ;
79 void SetFillAttributes() ;
80 void SetFillColor(Color_t fcolor) ;
81 void SetFillStyle(Style_t fstyle) ;
82 void SetLabelColor(Color_t color = 1, Option_t* axis = "X") ;
83 void SetLabelFont(Style_t font = 62, Option_t* axis = "X") ;
84 void SetLabelOffset(Float_t offset = 0.005, Option_t* axis = "X") ;
85 void SetLabelSize(Float_t size = 0.02, Option_t* axis = "X") ;
86 void SetLineAttributes() ;
87 void SetLineColor(Color_t lcolor) ;
88 void SetLineStyle(Style_t lstyle) ;
89 void SetLineWidth(Width_t lwidth) ;
90 void SetMarkerAttributes() ;
91 void SetMarkerColor(Color_t tcolor = 1) ;
92 void SetMarkerSize(Size_t msize = 1) ;
93 void SetMarkerStyle(Style_t mstyle = 1) ;
94 void SetName(const char *name) ;
95 void SetTitle(const char *name) ;
96 void SetNameTitle(const char *name, const char* title) ;
97 void SetNdivisions(Int_t n = 510, Option_t* axis = "X") ;
98 void SetOption(Option_t* option = " ") ;
99 void SetStats(Bool_t stats = kTRUE) ;
100 void SetTickLength(Float_t length = 0.02, Option_t* axis = "X") ;
101 void SetTitleFont(Style_t font = 62, Option_t* axis = "X") ;
102 void SetTitleOffset(Float_t offset = 1, Option_t* axis = "X") ;
103 void SetTitleSize(Float_t size = 0.02, Option_t* axis = "X") ;
104 void SetXTitle(const char* title) ;
105 void SetYTitle(const char* title) ;
106 void SetZTitle(const char* title) ;
107
108 // container management
109 const char* nameOf(Int_t idx) const ;
110 TObject *findObject(const char *name, const TClass* clas=0) const;
111 TObject* getObject(Int_t idx) const ;
112 Stat_t numItems() const {return _items.GetSize();}
113
114 void addPlotable(RooPlotable *plotable, Option_t *drawOptions= "", Bool_t invisible=kFALSE, Bool_t refreshNorm=kFALSE);
115 void addObject(TObject* obj, Option_t* drawOptions= "", Bool_t invisible=kFALSE);
116 void addTH1(TH1 *hist, Option_t* drawOptions= "", Bool_t invisible=kFALSE);
117 std::unique_ptr<TLegend> BuildLegend() const;
118
119 void remove(const char* name=0, Bool_t deleteToo=kTRUE) ;
120
121 // ascii printing
122 virtual void printName(std::ostream& os) const ;
123 virtual void printTitle(std::ostream& os) const ;
124 virtual void printClassName(std::ostream& os) const ;
125 virtual void printArgs(std::ostream& os) const ;
126 virtual void printValue(std::ostream& os) const ;
127 virtual void printMultiline(std::ostream& os, Int_t content, Bool_t verbose=kFALSE, TString indent="") const ;
128
129 virtual Int_t defaultPrintContents(Option_t* opt) const ;
130
131 inline virtual void Print(Option_t *options= 0) const {
133 }
134
135 // data member get/set methods
136 inline RooAbsRealLValue *getPlotVar() const { return _plotVarClone; }
137 ///Return the number of events in the fit range
138 inline Double_t getFitRangeNEvt() const { return _normNumEvts; }
139 Double_t getFitRangeNEvt(Double_t xlo, Double_t xhi) const ;
140 ///Return the bin width that is being used to normalise the PDF
141 inline Double_t getFitRangeBinW() const { return _normBinWidth; }
142 inline Double_t getPadFactor() const { return _padFactor; }
143 inline void setPadFactor(Double_t factor) { if(factor >= 0) _padFactor= factor; }
144 void updateNormVars(const RooArgSet &vars);
145 const RooArgSet *getNormVars() const { return _normVars; }
146
147 // get attributes of contained objects
148 TAttLine *getAttLine(const char *name=0) const;
149 TAttFill *getAttFill(const char *name=0) const;
150 TAttMarker *getAttMarker(const char *name=0) const;
151 TAttText *getAttText(const char *name=0) const;
152
153 // Convenient type-safe accessors
154 RooCurve* getCurve(const char* name=0) const ;
155 RooHist* getHist(const char* name=0) const ;
156
157
158 // rearrange drawing order of contained objects
159 Bool_t drawBefore(const char *before, const char *target);
160 Bool_t drawAfter(const char *after, const char *target);
161
162 // get/set drawing options for contained objects
163 TString getDrawOptions(const char *name) const;
164 Bool_t setDrawOptions(const char *name, TString options);
165
166 Bool_t getInvisible(const char* name) const ;
167 void setInvisible(const char* name, Bool_t flag=kTRUE) ;
168
169 virtual void SetMaximum(Double_t maximum = -1111) ;
170 virtual void SetMinimum(Double_t minimum = -1111) ;
171
172 ///Shortcut for RooPlot::chiSquare(const char* pdfname, const char* histname, int nFitParam=0)
173 Double_t chiSquare(int nFitParam=0) const { return chiSquare(0,0,nFitParam) ; }
174 Double_t chiSquare(const char* pdfname, const char* histname, int nFitParam=0) const ;
175
176 RooHist* residHist(const char* histname=0, const char* pdfname=0,bool normalize=false, bool useAverage=true) const ;
177 ///Uses residHist() and sets normalize=true
178 RooHist* pullHist(const char* histname=0, const char* pdfname=0, bool useAverage=true) const
179 { return residHist(histname,pdfname,true,useAverage); }
180
181 void Browse(TBrowser *b) ;
182
183 /// \copydoc AddDirectoryStatus()
184 static Bool_t addDirectoryStatus() ;
185 /// \copydoc AddDirectory()
186 static Bool_t setAddDirectoryStatus(Bool_t flag) ;
187
188 /// Configure whether new instances of RooPlot will add themselves to `gDirectory`.
189 /// Like TH1::AddDirectory().
190 static void AddDirectory(Bool_t add=kTRUE) {
192 }
193 /// Query whether new instances of RooPlot will add themselves to `gDirectory`.
194 /// When a file has been opened before a RooPlot instance is created,
195 /// this instance will be associated to the file. Closing the file will e.g.
196 /// write the instance to the file, and then delete it.
197 /// Like TH1::AddDirectoryStatus().
199 return addDirectoryStatus();
200 }
201
202 void SetDirectory(TDirectory *dir);
203
204protected:
205
206 RooPlot(const RooPlot& other); // cannot be copied
207
208 class DrawOpt {
209 public:
210
211 DrawOpt(const char* _rawOpt=0) : invisible(kFALSE) { drawOptions[0] = 0 ; initialize(_rawOpt) ; }
212 void initialize(const char* _rawOpt) ;
213 const char* rawOpt() const ;
214
215 char drawOptions[128] ;
217 } ;
218
219
220 void initialize();
221 TString histName() const ;
222 TString caller(const char *method) const;
223 void updateYAxis(Double_t ymin, Double_t ymax, const char *label= "");
224 void updateFitRangeNorm(const TH1* hist);
225 void updateFitRangeNorm(const RooPlotable* rp, Bool_t refeshNorm=kFALSE);
226
227 TH1* _hist ; // Histogram that we uses as basis for drawing the content
228
229 RooList _items; // A list of the items we contain.
230 Double_t _padFactor; // Scale our y-axis to _padFactor of our maximum contents.
231 RooAbsRealLValue *_plotVarClone; // A clone of the variable we are plotting.
232 RooArgSet *_plotVarSet; // A list owning the cloned tree nodes of the plotVarClone
233 RooArgSet *_normVars; // Variables that PDF plots should be normalized over
234
235 const RooPlotable* _normObj ; //! Pointer to normalization object ;
236 Double_t _normNumEvts; // Number of events in histogram (for normalization)
237 Double_t _normBinWidth; // Histogram bin width (for normalization)
238
239 Double_t _defYmin ; // Default minimum for Yaxis (as calculated from contents)
240 Double_t _defYmax ; // Default maximum for Yaxis (as calculated from contents)
241
242 TDirectory* _dir ; //! non-persistent
243
244 static Bool_t _addDirStatus ; // static flag controlling AutoDirectoryAdd feature
245
246 ClassDef(RooPlot,2) // Plot frame and container for graphics objects
247};
248
249#endif
#define b(i)
Definition RSha256.hxx:100
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
float Size_t
Definition RtypesCore.h:96
const Bool_t kFALSE
Definition RtypesCore.h:101
short Width_t
Definition RtypesCore.h:91
double Double_t
Definition RtypesCore.h:59
double Stat_t
Definition RtypesCore.h:86
short Color_t
Definition RtypesCore.h:92
short Style_t
Definition RtypesCore.h:89
float Float_t
Definition RtypesCore.h:57
const Bool_t kTRUE
Definition RtypesCore.h:100
const char Option_t
Definition RtypesCore.h:66
#define ClassDef(name, id)
Definition Rtypes.h:325
static void indent(ostringstream &buf, int indent_level)
include TDocParser_001 C image html pict1_TDocParser_001 png width
char name[80]
Definition TGX11.cxx:110
float xmin
float ymin
float xmax
float ymax
RooAbsRealLValue is the common abstract base class for objects that represent a real value that may a...
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition RooAbsReal.h:64
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:35
A RooCurve is a one-dimensional graphical representation of a real-valued function.
Definition RooCurve.h:32
A RooHist is a graphical representation of binned data based on the TGraphAsymmErrors class.
Definition RooHist.h:27
A RooList is a TList with extra support for working with options that are associated with each node.
Definition RooList.h:21
char drawOptions[128]
Definition RooPlot.h:215
Bool_t invisible
Definition RooPlot.h:216
DrawOpt(const char *_rawOpt=0)
Definition RooPlot.h:211
const char * rawOpt() const
Return the raw draw options.
Definition RooPlot.cxx:1199
A RooPlot is a plot frame and a container for graphics objects within that frame.
Definition RooPlot.h:44
RooPlot()
Default constructor coverity[UNINIT_CTOR].
Definition RooPlot.cxx:86
void SetAxisColor(Color_t color=1, Option_t *axis="X")
Definition RooPlot.cxx:1290
static Bool_t setAddDirectoryStatus(Bool_t flag)
Configure whether new instances of RooPlot will add themselves to gDirectory.
Definition RooPlot.cxx:79
Bool_t 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:935
void SetMarkerSize(Size_t msize=1)
Definition RooPlot.cxx:1330
Double_t _defYmin
Definition RooPlot.h:239
const RooPlotable * _normObj
Definition RooPlot.h:235
RooAbsRealLValue * _plotVarClone
Definition RooPlot.h:231
RooHist * residHist(const char *histname=0, const char *pdfname=0, bool normalize=false, bool useAverage=true) const
Return a RooHist (derives from TGraphAsymErrors) containing the residuals of a histogram.
Definition RooPlot.cxx:1115
virtual void printTitle(std::ostream &os) const
Print frame title.
Definition RooPlot.cxx:703
RooArgSet * _normVars
Definition RooPlot.h:233
virtual Int_t defaultPrintContents(Option_t *opt) const
Define default print options, for a given print style.
Definition RooPlot.cxx:1268
static Bool_t _addDirStatus
non-persistent
Definition RooPlot.h:244
Bool_t 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:924
void SetMarkerColor(Color_t tcolor=1)
Definition RooPlot.cxx:1328
Double_t chiSquare(int nFitParam=0) const
Shortcut for RooPlot::chiSquare(const char* pdfname, const char* histname, int nFitParam=0)
Definition RooPlot.h:173
virtual void printClassName(std::ostream &os) const
Print frame class name.
Definition RooPlot.cxx:712
void SetContourLevel(Int_t level, Double_t value)
Definition RooPlot.cxx:1300
void SetXTitle(const char *title)
Definition RooPlot.cxx:1348
void SetFillColor(Color_t fcolor)
Definition RooPlot.cxx:1306
TAttMarker * getAttMarker(const char *name=0) const
Return a pointer to the marker attributes of the named object in this plot, or zero if the named obje...
Definition RooPlot.cxx:856
RooArgSet * _plotVarSet
Definition RooPlot.h:232
void SetStats(Bool_t stats=kTRUE)
Like TH1::SetStats(), but statistics boxes are off by default in RooFit.
Definition RooPlot.cxx:1338
void SetNdivisions(Int_t n=510, Option_t *axis="X")
Definition RooPlot.cxx:1334
TDirectory * _dir
Definition RooPlot.h:242
TString histName() const
Construct automatic name of internal TH1.
Definition RooPlot.cxx:330
RooList _items
Definition RooPlot.h:229
TH1 * _hist
Definition RooPlot.h:227
void updateYAxis(Double_t ymin, Double_t ymax, const char *label="")
Update our y-axis limits to accomodate an object whose spread in y is (ymin,ymax).
Definition RooPlot.cxx:629
void SetMarkerStyle(Style_t mstyle=1)
Definition RooPlot.cxx:1332
void addObject(TObject *obj, Option_t *drawOptions="", Bool_t invisible=kFALSE)
Add a generic object to this plot.
Definition RooPlot.cxx:392
TString getDrawOptions(const char *name) const
Return the Draw() options registered for the named object.
Definition RooPlot.cxx:977
virtual void printArgs(std::ostream &os) const
Interface for printing of object arguments.
Definition RooPlot.cxx:721
void SetDrawOption(Option_t *option="")
Definition RooPlot.cxx:1302
void SetZTitle(const char *title)
Definition RooPlot.cxx:1352
Double_t GetMinimum(Double_t minval=-FLT_MAX) const
Definition RooPlot.cxx:1284
static void AddDirectory(Bool_t add=kTRUE)
Configure whether new instances of RooPlot will add themselves to gDirectory.
Definition RooPlot.h:190
void SetContour(Int_t nlevels, const Double_t *levels=0)
Definition RooPlot.cxx:1298
Double_t getFitRangeNEvt() const
Return the number of events in the fit range.
Definition RooPlot.h:138
Double_t getPadFactor() const
Definition RooPlot.h:142
Double_t getFitRangeBinW() const
Return the bin width that is being used to normalise the PDF.
Definition RooPlot.h:141
const RooArgSet * getNormVars() const
Definition RooPlot.h:145
RooPlot(const RooPlot &other)
void SetDirectory(TDirectory *dir)
Set the directory that this plot is associated to.
Definition RooPlot.cxx:362
Stat_t numItems() const
Definition RooPlot.h:112
TAttFill * getAttFill(const char *name=0) const
Return a pointer to the fill attributes of the named object in this plot, or zero if the named object...
Definition RooPlot.cxx:846
void SetTitle(const char *name)
Set the title of the RooPlot to 'title'.
Definition RooPlot.cxx:1257
virtual void printName(std::ostream &os) const
Print frame name.
Definition RooPlot.cxx:694
void SetLabelOffset(Float_t offset=0.005, Option_t *axis="X")
Definition RooPlot.cxx:1314
void SetLineWidth(Width_t lwidth)
Definition RooPlot.cxx:1324
void SetTickLength(Float_t length=0.02, Option_t *axis="X")
Definition RooPlot.cxx:1340
void SetFillAttributes()
Definition RooPlot.cxx:1304
Double_t _normNumEvts
Pointer to normalization object ;.
Definition RooPlot.h:236
TAttText * getAttText(const char *name=0) const
Return a pointer to the text attributes of the named object in this plot, or zero if the named object...
Definition RooPlot.cxx:866
void SetLabelSize(Float_t size=0.02, Option_t *axis="X")
Definition RooPlot.cxx:1316
virtual void SetMinimum(Double_t minimum=-1111)
Set minimum value of Y axis.
Definition RooPlot.cxx:1061
void SetOption(Option_t *option=" ")
Definition RooPlot.cxx:1336
TObject * getObject(Int_t idx) const
Return the name of the object at slot 'idx' in this RooPlot.
Definition RooPlot.cxx:820
TAxis * GetYaxis() const
Definition RooPlot.cxx:1278
RooAbsRealLValue * getPlotVar() const
Definition RooPlot.h:136
void SetNameTitle(const char *name, const char *title)
Set the name and title of the RooPlot to 'name' and 'title'.
Definition RooPlot.cxx:1246
void SetName(const char *name)
Set the name of the RooPlot to 'name'.
Definition RooPlot.cxx:1235
void SetLabelFont(Style_t font=62, Option_t *axis="X")
Definition RooPlot.cxx:1312
void SetLineStyle(Style_t lstyle)
Definition RooPlot.cxx:1322
void setPadFactor(Double_t factor)
Definition RooPlot.h:143
TAttLine * getAttLine(const char *name=0) const
Return a pointer to the line attributes of the named object in this plot, or zero if the named object...
Definition RooPlot.cxx:836
void SetTitleFont(Style_t font=62, Option_t *axis="X")
Definition RooPlot.cxx:1342
TAxis * GetXaxis() const
Definition RooPlot.cxx:1276
void SetLineColor(Color_t lcolor)
Definition RooPlot.cxx:1320
void SetFillStyle(Style_t fstyle)
Definition RooPlot.cxx:1308
const char * nameOf(Int_t idx) const
Return the name of the object at slot 'idx' in this RooPlot.
Definition RooPlot.cxx:804
Bool_t getInvisible(const char *name) const
Returns true of object with given name is set to be invisible.
Definition RooPlot.cxx:1004
void updateNormVars(const RooArgSet &vars)
Install the given set of observables are reference normalization variables for this frame.
Definition RooPlot.cxx:380
RooPlot * emptyClone(const char *name)
Return empty clone of current RooPlot.
Definition RooPlot.cxx:296
void SetMarkerAttributes()
Definition RooPlot.cxx:1326
Double_t GetMaximum(Double_t maxval=FLT_MAX) const
Definition RooPlot.cxx:1286
static RooPlot * frame(const RooAbsRealLValue &var, Double_t xmin, Double_t xmax, Int_t nBins)
Create a new frame for a given variable in x.
Definition RooPlot.cxx:249
virtual ~RooPlot()
Destructor.
Definition RooPlot.cxx:343
Bool_t setDrawOptions(const char *name, TString options)
Register the specified drawing options for the named object.
Definition RooPlot.cxx:989
void SetLabelColor(Color_t color=1, Option_t *axis="X")
Definition RooPlot.cxx:1310
void addPlotable(RooPlotable *plotable, Option_t *drawOptions="", Bool_t invisible=kFALSE, Bool_t refreshNorm=kFALSE)
Add the specified plotable object to our plot.
Definition RooPlot.cxx:540
Int_t GetNbinsX() const
Definition RooPlot.cxx:1280
void setInvisible(const char *name, Bool_t flag=kTRUE)
If flag is true object with 'name' is set to be invisible i.e.
Definition RooPlot.cxx:1017
void SetLineAttributes()
Definition RooPlot.cxx:1318
void addTH1(TH1 *hist, Option_t *drawOptions="", Bool_t invisible=kFALSE)
Add a TH1 histogram object to this plot.
Definition RooPlot.cxx:411
virtual void SetMaximum(Double_t maximum=-1111)
Set maximum value of Y axis.
Definition RooPlot.cxx:1051
void SetYTitle(const char *title)
Definition RooPlot.cxx:1350
TObject * findObject(const char *name, const TClass *clas=0) const
Find the named object in our list of items and return a pointer to it.
Definition RooPlot.cxx:952
Double_t _normBinWidth
Definition RooPlot.h:237
void Browse(TBrowser *b)
Plot RooPlot when double-clicked in browser.
Definition RooPlot.cxx:1360
virtual void printMultiline(std::ostream &os, Int_t content, Bool_t verbose=kFALSE, TString indent="") const
Frame detailed printing.
Definition RooPlot.cxx:764
std::unique_ptr< TLegend > BuildLegend() const
Build a legend that contains all objects that have been drawn on the plot.
Definition RooPlot.cxx:1421
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:574
virtual void Print(Option_t *options=0) const
Print TNamed name and title.
Definition RooPlot.h:131
RooCurve * getCurve(const char *name=0) const
Return a RooCurve pointer of the named object in this plot, or zero if the named object does not exis...
Definition RooPlot.cxx:877
static Bool_t AddDirectoryStatus()
Query whether new instances of RooPlot will add themselves to gDirectory.
Definition RooPlot.h:198
void SetTitleSize(Float_t size=0.02, Option_t *axis="X")
Definition RooPlot.cxx:1346
static Bool_t addDirectoryStatus()
Query whether new instances of RooPlot will add themselves to gDirectory.
Definition RooPlot.cxx:78
Double_t _padFactor
Definition RooPlot.h:230
void SetBarOffset(Float_t offset=0.25)
Definition RooPlot.cxx:1294
void SetBarWidth(Float_t width=0.5)
Definition RooPlot.cxx:1296
Int_t GetNdivisions(Option_t *axis="X") const
Definition RooPlot.cxx:1282
void SetAxisRange(Double_t xmin, Double_t xmax, Option_t *axis="X")
Definition RooPlot.cxx:1292
Double_t _defYmax
Definition RooPlot.h:240
TString caller(const char *method) const
Utility function.
Definition RooPlot.cxx:1036
RooHist * pullHist(const char *histname=0, const char *pdfname=0, bool useAverage=true) const
Uses residHist() and sets normalize=true.
Definition RooPlot.h:178
void initialize()
Perform initialization that is common to all constructors.
Definition RooPlot.cxx:307
static RooPlot * frameWithLabels(const RooAbsRealLValue &var)
Create a new frame for a given variable in x, adding bin labels.
Definition RooPlot.cxx:261
void remove(const char *name=0, Bool_t deleteToo=kTRUE)
Remove object with given name, or last object added if no name is given.
Definition RooPlot.cxx:899
void SetTitleOffset(Float_t offset=1, Option_t *axis="X")
Definition RooPlot.cxx:1344
RooHist * getHist(const char *name=0) const
Return a RooCurve pointer of the named object in this plot, or zero if the named object does not exis...
Definition RooPlot.cxx:887
virtual void printValue(std::ostream &os) const
Print frame arguments.
Definition RooPlot.cxx:735
Class RooPotable is a base class for objects that can be inserted into RooPlots and take advantage of...
Definition RooPlotable.h:26
RooPlotable is 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=0)
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:30
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:80
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
Describe directory structure in memory.
Definition TDirectory.h:45
TH1 is the base class of all histogram classes in ROOT.
Definition TH1.h:58
This class displays a legend box (TPaveText) containing several legend entries.
Definition TLegend.h:23
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:136
const Int_t n
Definition legend1.C:16
th1 Draw()