47 using Items = std::vector<std::pair<TObject*,std::string>>;
76 double GetMinimum(
double minval = -FLT_MAX) const ;
77 double GetMaximum(
double maxval = FLT_MAX) const ;
126 void remove(
const char*
name=
nullptr,
bool deleteToo=
true) ;
129 void printName(std::ostream& os)
const override ;
130 void printTitle(std::ostream& os)
const override ;
132 void printArgs(std::ostream& os)
const override ;
133 void printValue(std::ostream& os)
const override ;
176 virtual void SetMaximum(
double maximum = -1111) ;
177 virtual void SetMinimum(
double minimum = -1111) ;
181 double chiSquare(
const char* pdfname,
const char* histname,
int nFitParam=0)
const ;
183 RooHist*
residHist(
const char* histname=
nullptr,
const char* pdfname=
nullptr,
bool normalize=
false,
bool useAverage=
true)
const ;
185 RooHist*
pullHist(
const char* histname=
nullptr,
const char* pdfname=
nullptr,
bool useAverage=
true)
const
186 {
return residHist(histname,pdfname,
true,useAverage); }
222 const char*
rawOpt()
const ;
232 Items::const_iterator
findItem(std::string
const&
name)
const;
#define R__DEPRECATED(MAJOR, MINOR, REASON)
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
#define ClassDefOverride(name, id)
static void indent(ostringstream &buf, int indent_level)
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 TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void on
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
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...
RooArgSet is a container object that can hold multiple RooAbsArg objects.
One-dimensional graphical representation of a real-valued function.
Graphical representation of binned data based on the TGraphAsymmErrors class.
DrawOpt(const char *_rawOpt=nullptr)
const char * rawOpt() const
Return the raw draw options.
Plot frame and a container for graphics objects within that frame.
RooPlot()
Default constructor coverity[UNINIT_CTOR].
void SetAxisColor(Color_t color=1, Option_t *axis="X")
void remove(const char *name=nullptr, bool deleteToo=true)
Remove object with given name, or last object added if no name is given.
void SetDrawOption(Option_t *option="") override
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).
Items _items
A list of the items we contain.
void SetMarkerSize(Size_t msize=1)
static RooPlot * frame(const RooAbsRealLValue &var, double xmin, double xmax, Int_t nBins)
Create a new frame for a given variable in x.
const RooPlotable * _normObj
! Pointer to normalization object ;
double _normNumEvts
Number of events in histogram (for normalization)
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...
bool getInvisible(const char *name) const
Returns true of object with given name is set to be invisible.
void SetTitle(const char *name) override
Set the title of the RooPlot to 'title'.
RooArgSet * _normVars
Variables that PDF plots should be normalized over.
void addObject(TObject *obj, Option_t *drawOptions="", bool invisible=false)
Add a generic object to this plot.
Use the constructor that doesn t take the name and title
void addTH1(TH1 *hist, Option_t *drawOptions="", bool invisible=false)
Add a TH1 histogram object to this plot.
double _padFactor
Scale our y-axis to _padFactor of our maximum contents.
void SetMarkerColor(Color_t tcolor=1)
void printMultiline(std::ostream &os, Int_t content, bool verbose=false, TString indent="") const override
Frame detailed printing.
void SetXTitle(const char *title)
RooArgSet * _plotVarSet
A list owning the cloned tree nodes of the plotVarClone.
void SetNdivisions(Int_t n=510, Option_t *axis="X")
TDirectory * _dir
! non-persistent
TString histName() const
Construct automatic name of internal TH1.
TH1 * _hist
Histogram that we uses as basis for drawing the content.
void printName(std::ostream &os) const override
Print frame name.
TString getDrawOptions(const char *name) const
Return the Draw() options registered for the named object.
double _normBinWidth
Histogram bin width (for normalization)
void SetZTitle(const char *title)
void setInvisible(const char *name, bool flag=true)
If flag is true object with 'name' is set to be invisible i.e.
void SetContour(Int_t nlevels, const double *levels=nullptr)
void printClassName(std::ostream &os) const override
Print frame class name.
bool setDrawOptions(const char *name, TString options)
Register the specified drawing options for the named object.
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.
void SetStats(bool stats=true)
Like TH1::SetStats(), but statistics boxes are off by default in RooFit.
double getFitRangeNEvt() const
Return the number of events in the fit range.
const RooArgSet * getNormVars() const
std::vector< std::pair< TObject *, std::string > > Items
double GetMaximum(double maxval=FLT_MAX) const
void Print(Option_t *options=nullptr) const override
This method must be overridden when a class wants to print itself.
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...
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...
RooAbsRealLValue * _plotVar
The variable we are plotting.
void SetDirectory(TDirectory *dir)
Set the directory that this plot is associated to.
void SetLabelOffset(Float_t offset=0.005, Option_t *axis="X")
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...
void printTitle(std::ostream &os) const override
Print frame title.
void SetTickLength(Float_t length=0.02, Option_t *axis="X")
void SetContourLevel(Int_t level, double value)
static bool addDirectoryStatus()
Query whether new instances of RooPlot will add themselves to gDirectory.
void SetLabelSize(Float_t size=0.02, Option_t *axis="X")
double chiSquare(int nFitParam=0) const
Shortcut for RooPlot::chiSquare(const char* pdfname, const char* histname, int nFitParam=nullptr)
Items::iterator findItem(std::string const &name)
void SetOption(Option_t *option=" ")
TObject * getObject(Int_t idx) const
Return the name of the object at slot 'idx' in this RooPlot.
RooAbsRealLValue * getPlotVar() const
void SetLabelFont(Style_t font=62, Option_t *axis="X")
void Browse(TBrowser *b) override
Plot RooPlot when double-clicked in browser.
double _defYmax
Default maximum for Yaxis (as calculated from contents)
void SetLineStyle(Style_t lstyle)
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...
void SetTitleFont(Style_t font=62, Option_t *axis="X")
void SetAxisRange(double xmin, double xmax, Option_t *axis="X")
const char * nameOf(Int_t idx) const
Return the name of the object at slot 'idx' in this RooPlot.
void updateNormVars(const RooArgSet &vars)
Install the given set of observables are reference normalization variables for this frame.
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.
RooPlot * emptyClone(const char *name)
Return empty clone of current RooPlot.
void SetMarkerAttributes()
void createInternalPlotVarClone()
Replaces the pointer to the plot variable with a pointer to a clone of the plot variable that is owne...
void SetNameTitle(const char *name, const char *title) override
Set the name and title of the RooPlot to 'name' and 'title'.
void setPadFactor(double factor)
Int_t defaultPrintContents(Option_t *opt) const override
Define default print options, for a given print style.
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...
RooHist * pullHist(const char *histname=nullptr, const char *pdfname=nullptr, bool useAverage=true) const
Uses residHist() and sets normalize=true.
static bool setAddDirectoryStatus(bool flag)
Configure whether new instances of RooPlot will add themselves to gDirectory.
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...
void SetLabelColor(Color_t color=1, Option_t *axis="X")
static void fillItemsFromTList(Items &items, TList const &tlist)
RooFit-internal function for backwards compatibility.
static bool _addDirStatus
static flag controlling AutoDirectoryAdd feature
void printValue(std::ostream &os) const override
Print frame arguments.
void SetYTitle(const char *title)
double getPadFactor() const
static void AddDirectory(bool add=true)
Configure whether new instances of RooPlot will add themselves to gDirectory.
void printArgs(std::ostream &os) const override
Interface for printing of object arguments.
std::unique_ptr< TLegend > BuildLegend() const
Build a legend that contains all objects that have been drawn on the plot.
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...
void updateFitRangeNorm(const TH1 *hist)
Update our plot normalization over our plot variable's fit range, which will be determined by the fir...
void SetTitleSize(Float_t size=0.02, Option_t *axis="X")
double _defYmin
Default minimum for Yaxis (as calculated from contents)
void SetBarOffset(Float_t offset=0.25)
void SetBarWidth(Float_t width=0.5)
Int_t GetNdivisions(Option_t *axis="X") const
void addPlotable(RooPlotable *plotable, Option_t *drawOptions="", bool invisible=false, bool refreshNorm=false)
Add the specified plotable object to our plot.
void initialize()
Perform initialization that is common to all constructors.
static RooPlot * frameWithLabels(const RooAbsRealLValue &var)
Create a new frame for a given variable in x, adding bin labels.
void SetTitleOffset(Float_t offset=1, Option_t *axis="X")
Use the constructor that doesn t take the name and and then call SetName() and SetTitle() on the RooPlot.")
static bool AddDirectoryStatus()
Query whether new instances of RooPlot will add themselves to gDirectory.
double GetMinimum(double minval=-FLT_MAX) const
double getFitRangeBinW() const
Return the bin width that is being used to normalise the PDF.
Class RooPotable is a base class for objects that can be inserted into RooPlots and take advantage of...
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.
Class to manage histogram axis.
Using a TBrowser one can browse all ROOT objects.
TClass instances represent classes, structs and namespaces in the ROOT type system.
Describe directory structure in memory.
TH1 is the base class of all histogram classes in ROOT.
This class displays a legend box (TPaveText) containing several legend entries.
The TNamed class is the base class for all named ROOT classes.
Mother of all ROOT objects.