Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooPlot Class Reference

Plot frame and a container for graphics objects within that frame.

As a frame, it provides the TH1-style public interface for setting plot ranges, configuring axes, etc. As a container, it holds an arbitrary set of objects that might be histograms of data, curves representing a fit model, or text labels. Use the Draw() method to draw a frame and the objects it contains. Use the various add...() methods to add objects to be drawn. In general, the add...() methods create a private copy of the object you pass them and return a pointer to this copy. The caller owns the input object and this class owns the returned object. All RooAbsReal and RooAbsData derived classes implement plotOn() functions that facilitate to plot themselves on a given RooPlot, e.g.

data.plotOn(frame) ;
pdf.plotOn(frame) ;
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
Plot frame and a container for graphics objects within that frame.
Definition RooPlot.h:45
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:225
Double_t x[n]
Definition legend1.C:17

These high level functions also take care of any projections or other mappings that need to be made to plot a multi-dimensional object onto a one-dimensional plot.

Definition at line 45 of file RooPlot.h.

Classes

class  DrawOpt
 

Public Types

using Items = std::vector< std::pair< TObject *, std::string > >
 
- Public Types inherited from TObject
enum  {
  kIsOnHeap = 0x01000000 , kNotDeleted = 0x02000000 , kZombie = 0x04000000 , kInconsistent = 0x08000000 ,
  kBitMask = 0x00ffffff
}
 
enum  { kSingleKey = (1ULL << ( 0 )) , kOverwrite = (1ULL << ( 1 )) , kWriteDelete = (1ULL << ( 2 )) }
 
enum  EDeprecatedStatusBits { kObjInCanvas = (1ULL << ( 3 )) }
 
enum  EStatusBits {
  kCanDelete = (1ULL << ( 0 )) , kMustCleanup = (1ULL << ( 3 )) , kIsReferenced = (1ULL << ( 4 )) , kHasUUID = (1ULL << ( 5 )) ,
  kCannotPick = (1ULL << ( 6 )) , kNoContextMenu = (1ULL << ( 8 )) , kInvalidObject = (1ULL << ( 13 ))
}
 
- Public Types inherited from RooPrintable
enum  ContentsOption {
  kName =1 , kClassName =2 , kValue =4 , kArgs =8 ,
  kExtras =16 , kAddress =32 , kTitle =64 , kCollectionHeader =128
}
 
enum  StyleOption {
  kInline =1 , kSingleLine =2 , kStandard =3 , kVerbose =4 ,
  kTreeStructure =5
}
 

Public Member Functions

 RooPlot ()
 Default constructor coverity[UNINIT_CTOR].
 
 RooPlot (const char *name, const char *title, const RooAbsRealLValue &var, double xmin, double xmax, Int_t nBins) R__DEPRECATED(6
 Create an 1-dimensional with all properties taken from 'var', but with an explicit range [xmin,xmax] and a default binning of 'nbins'.
 
 RooPlot (const RooAbsRealLValue &var, double xmin, double xmax, Int_t nBins)
 Create an 1-dimensional with all properties taken from 'var', but with an explicit range [xmin,xmax] and a default binning of 'nbins'.
 
 RooPlot (const RooAbsRealLValue &var1, const RooAbsRealLValue &var2)
 Construct a two-dimensional RooPlot with ranges and properties taken from variables var1 and var2.
 
 RooPlot (const RooAbsRealLValue &var1, const RooAbsRealLValue &var2, double xmin, double xmax, double ymin, double ymax)
 Construct a two-dimensional RooPlot with ranges and properties taken from variables var1 and var2 but with an overriding range definition of [xmin,xmax] x [ymin,ymax].
 
 RooPlot (const RooPlot &other)=delete
 
Use RooPlot (double xmin, double xmax)
 
 RooPlot (double xmin, double xmax, double ymin, double ymax) R__DEPRECATED(6
 Construct of a two-dimensional RooPlot with ranges [xmin,xmax] x [ymin,ymax].
 
 RooPlot (double xmin, double xmax, int nBins=100)
 Constructor of RooPlot with range [xmin,xmax].
 
 ~RooPlot () override
 Destructor.
 
void addObject (TObject *obj, Option_t *drawOptions="", bool invisible=false)
 Add a generic object to this plot.
 
void addPlotable (RooPlotable *plotable, Option_t *drawOptions="", bool invisible=false, bool refreshNorm=false)
 Add the specified plotable object to our plot.
 
void addTH1 (TH1 *hist, Option_t *drawOptions="", bool invisible=false)
 Add a TH1 histogram object to this plot.
 
void Browse (TBrowser *b) override
 Plot RooPlot when double-clicked in browser.
 
std::unique_ptr< TLegendBuildLegend () const
 Build a legend that contains all objects that have been drawn on the plot.
 
double chiSquare (const char *pdfname, const char *histname, int nFitParam=0) const
 Calculate and return reduced chi-squared between a curve and a histogram.
 
double chiSquare (int nFitParam=0) const
 Shortcut for RooPlot::chiSquare(const char* pdfname, const char* histname, int nFitParam=nullptr)
 
void createInternalPlotVarClone ()
 Replaces the pointer to the plot variable with a pointer to a clone of the plot variable that is owned by this RooPlot.
 
Int_t defaultPrintContents (Option_t *opt) const override
 Define default print options, for a given print style.
 
void Draw (Option_t *options=nullptr) override
 Draw this plot and all of the elements it contains.
 
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 after the specified object.
 
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 before the specified object.
 
RooPlotemptyClone (const char *name)
 Return empty clone of current RooPlot.
 
TObjectfindObject (const char *name, const TClass *tClass=nullptr) const
 Find the named object in our list of items and return a pointer to it.
 
TAttFillgetAttFill (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 does not exist or does not have fill attributes.
 
TAttLinegetAttLine (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 does not exist or does not have line attributes.
 
TAttMarkergetAttMarker (const char *name=nullptr) const
 Return a pointer to the marker attributes of the named object in this plot, or zero if the named object does not exist or does not have marker attributes.
 
TAttTextgetAttText (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 does not exist or does not have text attributes.
 
RooCurvegetCurve (const char *name=nullptr) const
 Return a RooCurve pointer of the named object in this plot, or zero if the named object does not exist or is not a RooCurve.
 
TString getDrawOptions (const char *name) const
 Return the Draw() options registered for the named object.
 
double getFitRangeBinW () const
 Return the bin width that is being used to normalise the PDF.
 
double getFitRangeNEvt () const
 Return the number of events in the fit range.
 
double getFitRangeNEvt (double xlo, double xhi) const
 Return the number of events that is associated with the range [xlo,xhi] This method is only fully functional for ranges not equal to the full range if the object that inserted the normalization data provided a link to an external object that can calculate the event count in in sub ranges.
 
RooHistgetHist (const char *name=nullptr) const
 Return a RooCurve pointer of the named object in this plot, or zero if the named object does not exist or is not a RooCurve.
 
bool getInvisible (const char *name) const
 Returns true of object with given name is set to be invisible.
 
double GetMaximum (double maxval=FLT_MAX) const
 
double GetMinimum (double minval=-FLT_MAX) const
 
Int_t GetNbinsX () const
 
Int_t GetNdivisions (Option_t *axis="X") const
 
const RooArgSetgetNormVars () const
 
TObjectgetObject (Int_t idx) const
 Return the name of the object at slot 'idx' in this RooPlot.
 
double getPadFactor () const
 
RooAbsRealLValuegetPlotVar () const
 
TAxisGetXaxis () const
 
TAxisGetYaxis () const
 
TClassIsA () const override
 
const char * nameOf (Int_t idx) const
 Return the name of the object at slot 'idx' in this RooPlot.
 
Stat_t numItems () const
 
void Print (Option_t *options=nullptr) const override
 This method must be overridden when a class wants to print itself.
 
void printArgs (std::ostream &os) const override
 Interface for printing of object arguments.
 
void printClassName (std::ostream &os) const override
 Print frame class name.
 
void printMultiline (std::ostream &os, Int_t content, bool verbose=false, TString indent="") const override
 Frame detailed printing.
 
void printName (std::ostream &os) const override
 Print frame name.
 
void printTitle (std::ostream &os) const override
 Print frame title.
 
void printValue (std::ostream &os) const override
 Print frame arguments.
 
RooHistpullHist (const char *histname=nullptr, const char *pdfname=nullptr, bool useAverage=true) const
 Uses residHist() and sets normalize=true.
 
void remove (const char *name=nullptr, bool deleteToo=true)
 Remove object with given name, or last object added if no name is given.
 
RooHistresidHist (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.
 
void SetAxisColor (Color_t color=1, Option_t *axis="X")
 
void SetAxisRange (double xmin, double xmax, Option_t *axis="X")
 
void SetBarOffset (Float_t offset=0.25)
 
void SetBarWidth (Float_t width=0.5)
 
void SetContour (Int_t nlevels, const double *levels=nullptr)
 
void SetContourLevel (Int_t level, double value)
 
void SetDirectory (TDirectory *dir)
 Set the directory that this plot is associated to.
 
void SetDrawOption (Option_t *option="") override
 
bool setDrawOptions (const char *name, TString options)
 Register the specified drawing options for the named object.
 
void SetFillAttributes ()
 
void SetFillColor (Color_t fcolor)
 
void SetFillStyle (Style_t fstyle)
 
void setInvisible (const char *name, bool flag=true)
 If flag is true object with 'name' is set to be invisible i.e.
 
void SetLabelColor (Color_t color=1, Option_t *axis="X")
 
void SetLabelFont (Style_t font=62, Option_t *axis="X")
 
void SetLabelOffset (Float_t offset=0.005, Option_t *axis="X")
 
void SetLabelSize (Float_t size=0.02, Option_t *axis="X")
 
void SetLineAttributes ()
 
void SetLineColor (Color_t lcolor)
 
void SetLineStyle (Style_t lstyle)
 
void SetLineWidth (Width_t lwidth)
 
void SetMarkerAttributes ()
 
void SetMarkerColor (Color_t tcolor=1)
 
void SetMarkerSize (Size_t msize=1)
 
void SetMarkerStyle (Style_t mstyle=1)
 
virtual void SetMaximum (double maximum=-1111)
 Set maximum value of Y axis.
 
 SetMaximum (ymax)
 
virtual void SetMinimum (double minimum=-1111)
 Set minimum value of Y axis.
 
 SetMinimum (ymin)
 
Use the constructor that doesn t take the name and and then call SetName () and SetTitle() on the RooPlot.")
 
void SetName (const char *name) override
 Set the name of the RooPlot to 'name'.
 
void SetNameTitle (const char *name, const char *title) override
 Set the name and title of the RooPlot to 'name' and 'title'.
 
void SetNdivisions (Int_t n=510, Option_t *axis="X")
 
void SetOption (Option_t *option=" ")
 
void setPadFactor (double factor)
 
void SetStats (bool stats=true)
 Like TH1::SetStats(), but statistics boxes are off by default in RooFit.
 
void SetTickLength (Float_t length=0.02, Option_t *axis="X")
 
void SetTitle (const char *name) override
 Set the title of the RooPlot to 'title'.
 
void SetTitleFont (Style_t font=62, Option_t *axis="X")
 
void SetTitleOffset (Float_t offset=1, Option_t *axis="X")
 
void SetTitleSize (Float_t size=0.02, Option_t *axis="X")
 
void SetXTitle (const char *title)
 
void SetYTitle (const char *title)
 
void SetZTitle (const char *title)
 
void Streamer (TBuffer &) override
 Stream an object of class TObject.
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
void updateNormVars (const RooArgSet &vars)
 Install the given set of observables are reference normalization variables for this frame.
 
- Public Member Functions inherited from TNamed
 TNamed ()
 
 TNamed (const char *name, const char *title)
 
 TNamed (const TNamed &named)
 TNamed copy ctor.
 
 TNamed (const TString &name, const TString &title)
 
virtual ~TNamed ()
 TNamed destructor.
 
void Clear (Option_t *option="") override
 Set name and title to empty strings ("").
 
TObjectClone (const char *newname="") const override
 Make a clone of an object using the Streamer facility.
 
Int_t Compare (const TObject *obj) const override
 Compare two TNamed objects.
 
void Copy (TObject &named) const override
 Copy this to obj.
 
virtual void FillBuffer (char *&buffer)
 Encode TNamed into output buffer.
 
const char * GetName () const override
 Returns name of object.
 
const char * GetTitle () const override
 Returns title of object.
 
ULong_t Hash () const override
 Return hash value for this object.
 
TClassIsA () const override
 
Bool_t IsSortable () const override
 
void ls (Option_t *option="") const override
 List TNamed name and title.
 
TNamedoperator= (const TNamed &rhs)
 TNamed assignment operator.
 
void Print (Option_t *option="") const override
 Print TNamed name and title.
 
virtual Int_t Sizeof () const
 Return size of the TNamed part of the TObject.
 
void Streamer (TBuffer &) override
 Stream an object of class TObject.
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
- Public Member Functions inherited from TObject
 TObject ()
 TObject constructor.
 
 TObject (const TObject &object)
 TObject copy ctor.
 
virtual ~TObject ()
 TObject destructor.
 
void AbstractMethod (const char *method) const
 Use this method to implement an "abstract" method that you don't want to leave purely abstract.
 
virtual void AppendPad (Option_t *option="")
 Append graphics object to current pad.
 
ULong_t CheckedHash ()
 Check and record whether this class has a consistent Hash/RecursiveRemove setup (*) and then return the regular Hash value for this object.
 
virtual const char * ClassName () const
 Returns name of class to which the object belongs.
 
virtual void Delete (Option_t *option="")
 Delete this object.
 
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
 Computes distance from point (px,py) to the object.
 
virtual void DrawClass () const
 Draw class inheritance tree of the class to which this object belongs.
 
virtual TObjectDrawClone (Option_t *option="") const
 Draw a clone of this object in the current selected pad with: gROOT->SetSelectedPad(c1).
 
virtual void Dump () const
 Dump contents of object on stdout.
 
virtual void Error (const char *method, const char *msgfmt,...) const
 Issue error message.
 
virtual void Execute (const char *method, const char *params, Int_t *error=nullptr)
 Execute method on this object with the given parameter string, e.g.
 
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=nullptr)
 Execute method on this object with parameters stored in the TObjArray.
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 Execute action corresponding to an event at (px,py).
 
virtual void Fatal (const char *method, const char *msgfmt,...) const
 Issue fatal error message.
 
virtual TObjectFindObject (const char *name) const
 Must be redefined in derived classes.
 
virtual TObjectFindObject (const TObject *obj) const
 Must be redefined in derived classes.
 
virtual Option_tGetDrawOption () const
 Get option used by the graphics system to draw this object.
 
virtual const char * GetIconName () const
 Returns mime type name of object.
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 Returns string containing info about the object at position (px,py).
 
virtual Option_tGetOption () const
 
virtual UInt_t GetUniqueID () const
 Return the unique object id.
 
virtual Bool_t HandleTimer (TTimer *timer)
 Execute action in response of a timer timing out.
 
Bool_t HasInconsistentHash () const
 Return true is the type of this object is known to have an inconsistent setup for Hash and RecursiveRemove (i.e.
 
virtual void Info (const char *method, const char *msgfmt,...) const
 Issue info message.
 
virtual Bool_t InheritsFrom (const char *classname) const
 Returns kTRUE if object inherits from class "classname".
 
virtual Bool_t InheritsFrom (const TClass *cl) const
 Returns kTRUE if object inherits from TClass cl.
 
virtual void Inspect () const
 Dump contents of this object in a graphics canvas.
 
void InvertBit (UInt_t f)
 
Bool_t IsDestructed () const
 IsDestructed.
 
virtual Bool_t IsEqual (const TObject *obj) const
 Default equal comparison (objects are equal if they have the same address in memory).
 
virtual Bool_t IsFolder () const
 Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).
 
R__ALWAYS_INLINE Bool_t IsOnHeap () const
 
R__ALWAYS_INLINE Bool_t IsZombie () const
 
void MayNotUse (const char *method) const
 Use this method to signal that a method (defined in a base class) may not be called in a derived class (in principle against good design since a child class should not provide less functionality than its parent, however, sometimes it is necessary).
 
virtual Bool_t Notify ()
 This method must be overridden to handle object notification (the base implementation is no-op).
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 Use this method to declare a method obsolete.
 
void operator delete (void *ptr)
 Operator delete.
 
void operator delete (void *ptr, void *vp)
 Only called by placement new when throwing an exception.
 
void operator delete[] (void *ptr)
 Operator delete [].
 
void operator delete[] (void *ptr, void *vp)
 Only called by placement new[] when throwing an exception.
 
void * operator new (size_t sz)
 
void * operator new (size_t sz, void *vp)
 
void * operator new[] (size_t sz)
 
void * operator new[] (size_t sz, void *vp)
 
TObjectoperator= (const TObject &rhs)
 TObject assignment operator.
 
virtual void Paint (Option_t *option="")
 This method must be overridden if a class wants to paint itself.
 
virtual void Pop ()
 Pop on object drawn in a pad to the top of the display list.
 
virtual Int_t Read (const char *name)
 Read contents of object with specified name from the current directory.
 
virtual void RecursiveRemove (TObject *obj)
 Recursively remove this object from a list.
 
void ResetBit (UInt_t f)
 
virtual void SaveAs (const char *filename="", Option_t *option="") const
 Save this object in the file specified by filename.
 
virtual void SavePrimitive (std::ostream &out, Option_t *option="")
 Save a primitive as a C++ statement(s) on output stream "out".
 
void SetBit (UInt_t f)
 
void SetBit (UInt_t f, Bool_t set)
 Set or unset the user status bits as specified in f.
 
virtual void SetUniqueID (UInt_t uid)
 Set the unique object id.
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
virtual void SysError (const char *method, const char *msgfmt,...) const
 Issue system error message.
 
R__ALWAYS_INLINE Bool_t TestBit (UInt_t f) const
 
Int_t TestBits (UInt_t f) const
 
virtual void UseCurrentStyle ()
 Set current style settings in this object This function is called when either TCanvas::UseCurrentStyle or TROOT::ForceStyle have been invoked.
 
virtual void Warning (const char *method, const char *msgfmt,...) const
 Issue warning message.
 
virtual Int_t Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0)
 Write this object to the current directory.
 
virtual Int_t Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0) const
 Write this object to the current directory.
 
- Public Member Functions inherited from RooPrintable
 RooPrintable ()
 
virtual ~RooPrintable ()
 
virtual StyleOption defaultPrintStyle (Option_t *opt) const
 
virtual void printAddress (std::ostream &os) const
 Print class name of object.
 
virtual void printExtras (std::ostream &os) const
 Interface to print extras of object.
 
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, which is interpreted as an OR of 'enum ContentsOptions' values and in the style given by 'enum StyleOption'.
 
virtual void printTree (std::ostream &os, TString indent="") const
 Interface for tree structure printing of object.
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 

Static Public Member Functions

static void AddDirectory (bool add=true)
 Configure whether new instances of RooPlot will add themselves to gDirectory.
 
static bool addDirectoryStatus ()
 Query whether new instances of RooPlot will add themselves to gDirectory.
 
static bool AddDirectoryStatus ()
 Query whether new instances of RooPlot will add themselves to gDirectory.
 
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
static void fillItemsFromTList (Items &items, TList const &tlist)
 RooFit-internal function for backwards compatibility.
 
static RooPlotframe (const RooAbsRealLValue &var, double xmin, double xmax, Int_t nBins)
 Create a new frame for a given variable in x.
 
static RooPlotframeWithLabels (const RooAbsRealLValue &var)
 Create a new frame for a given variable in x, adding bin labels.
 
static bool setAddDirectoryStatus (bool flag)
 Configure whether new instances of RooPlot will add themselves to gDirectory.
 
- Static Public Member Functions inherited from TNamed
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
- Static Public Member Functions inherited from TObject
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
static Longptr_t GetDtorOnly ()
 Return destructor only flag.
 
static Bool_t GetObjectStat ()
 Get status of object stat flag.
 
static void SetDtorOnly (void *obj)
 Set destructor only flag.
 
static void SetObjectStat (Bool_t stat)
 Turn on/off tracking of objects in the TObjectTable.
 
- Static Public Member Functions inherited from RooPrintable
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
static std::ostream & defaultPrintStream (std::ostream *os=nullptr)
 Return a reference to the current default stream to use in Print().
 
static void nameFieldLength (Int_t newLen)
 Set length of field reserved from printing name of RooAbsArgs in multi-line collection printing to given amount.
 

Public Attributes

Use the constructor that doesn t take the name and title
 

Protected Member Functions

Items::iterator findItem (std::string const &name)
 
Items::const_iterator findItem (std::string const &name) const
 
TString histName () const
 Construct automatic name of internal TH1.
 
void initialize ()
 Perform initialization that is common to all constructors.
 
void updateFitRangeNorm (const RooPlotable *rp, bool refreshNorm=false)
 Update our plot normalization over our plot variable's fit range, which will be determined by the first suitable object added to our plot.
 
void updateFitRangeNorm (const TH1 *hist)
 Update our plot normalization over our plot variable's fit range, which will be determined by the first suitable object added to our plot.
 
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).
 
- Protected Member Functions inherited from TObject
virtual void DoError (int level, const char *location, const char *fmt, va_list va) const
 Interface to ErrorHandler (protected).
 
void MakeZombie ()
 

Protected Attributes

double _defYmax = 1.0
 Default maximum for Yaxis (as calculated from contents)
 
double _defYmin = 1e-5
 Default minimum for Yaxis (as calculated from contents)
 
TDirectory_dir = nullptr
 ! non-persistent
 
TH1_hist = nullptr
 Histogram that we uses as basis for drawing the content.
 
Items _items
 A list of the items we contain.
 
double _normBinWidth = 0
 Histogram bin width (for normalization)
 
double _normNumEvts = 0
 Number of events in histogram (for normalization)
 
const RooPlotable_normObj = nullptr
 ! Pointer to normalization object ;
 
RooArgSet_normVars = nullptr
 Variables that PDF plots should be normalized over.
 
double _padFactor
 Scale our y-axis to _padFactor of our maximum contents.
 
RooAbsRealLValue_plotVar = nullptr
 The variable we are plotting.
 
RooArgSet_plotVarSet = nullptr
 A list owning the cloned tree nodes of the plotVarClone.
 
- Protected Attributes inherited from TNamed
TString fName
 
TString fTitle
 

Static Protected Attributes

static bool _addDirStatus = true
 static flag controlling AutoDirectoryAdd feature
 
- Static Protected Attributes inherited from RooPrintable
static Int_t _nameLength
 

Additional Inherited Members

- Protected Types inherited from TObject
enum  { kOnlyPrepStep = (1ULL << ( 3 )) }
 

#include <RooPlot.h>

Inheritance diagram for RooPlot:
[legend]

Member Typedef Documentation

◆ Items

using RooPlot::Items = std::vector<std::pair<TObject*,std::string> >

Definition at line 47 of file RooPlot.h.

Constructor & Destructor Documentation

◆ RooPlot() [1/9]

RooPlot::RooPlot ( )

Default constructor coverity[UNINIT_CTOR].

Definition at line 85 of file RooPlot.cxx.

◆ RooPlot() [2/9]

RooPlot::RooPlot ( const char *  name,
const char *  title,
const RooAbsRealLValue var,
double  xmin,
double  xmax,
Int_t  nBins 
)

Create an 1-dimensional with all properties taken from 'var', but with an explicit range [xmin,xmax] and a default binning of 'nbins'.

Definition at line 176 of file RooPlot.cxx.

◆ RooPlot() [3/9]

RooPlot::RooPlot ( const RooAbsRealLValue var,
double  xmin,
double  xmax,
Int_t  nBins 
)

Create an 1-dimensional with all properties taken from 'var', but with an explicit range [xmin,xmax] and a default binning of 'nbins'.

Definition at line 199 of file RooPlot.cxx.

◆ RooPlot() [4/9]

RooPlot::RooPlot ( double  xmin,
double  xmax,
int  nBins = 100 
)

Constructor of RooPlot with range [xmin,xmax].

Definition at line 96 of file RooPlot.cxx.

◆ RooPlot() [5/9]

RooPlot::RooPlot ( double  xmin,
double  xmax,
double  ymin,
double  ymax 
)

Construct of a two-dimensional RooPlot with ranges [xmin,xmax] x [ymin,ymax].

Definition at line 113 of file RooPlot.cxx.

◆ RooPlot() [6/9]

Use RooPlot::RooPlot ( double  xmin,
double  xmax 
)

◆ RooPlot() [7/9]

RooPlot::RooPlot ( const RooAbsRealLValue var1,
const RooAbsRealLValue var2 
)

Construct a two-dimensional RooPlot with ranges and properties taken from variables var1 and var2.

Definition at line 145 of file RooPlot.cxx.

◆ RooPlot() [8/9]

RooPlot::RooPlot ( const RooAbsRealLValue var1,
const RooAbsRealLValue var2,
double  xmin,
double  xmax,
double  ymin,
double  ymax 
)

Construct a two-dimensional RooPlot with ranges and properties taken from variables var1 and var2 but with an overriding range definition of [xmin,xmax] x [ymin,ymax].

Definition at line 161 of file RooPlot.cxx.

◆ ~RooPlot()

RooPlot::~RooPlot ( )
override

Destructor.

Definition at line 314 of file RooPlot.cxx.

◆ RooPlot() [9/9]

RooPlot::RooPlot ( const RooPlot other)
delete

Member Function Documentation

◆ AddDirectory()

static void RooPlot::AddDirectory ( bool  add = true)
inlinestatic

Configure whether new instances of RooPlot will add themselves to gDirectory.

Like TH1::AddDirectory().

Definition at line 197 of file RooPlot.h.

◆ addDirectoryStatus()

bool RooPlot::addDirectoryStatus ( )
static

Query whether new instances of RooPlot will add themselves to gDirectory.

When a file has been opened before a RooPlot instance is created, this instance will be associated to the file. Closing the file will e.g. write the instance to the file, and then delete it. Like TH1::AddDirectoryStatus().

Definition at line 77 of file RooPlot.cxx.

◆ AddDirectoryStatus()

static bool RooPlot::AddDirectoryStatus ( )
inlinestatic

Query whether new instances of RooPlot will add themselves to gDirectory.

When a file has been opened before a RooPlot instance is created, this instance will be associated to the file. Closing the file will e.g. write the instance to the file, and then delete it. Like TH1::AddDirectoryStatus().

Definition at line 205 of file RooPlot.h.

◆ addObject()

void RooPlot::addObject ( TObject obj,
Option_t drawOptions = "",
bool  invisible = false 
)

Add a generic object to this plot.

The specified options will be used to Draw() this object later. The caller transfers ownership of the object with this call, and the object will be deleted when its containing plot object is destroyed.

Definition at line 366 of file RooPlot.cxx.

◆ addPlotable()

void RooPlot::addPlotable ( RooPlotable plotable,
Option_t drawOptions = "",
bool  invisible = false,
bool  refreshNorm = false 
)

Add the specified plotable object to our plot.

Increase our y-axis limits to fit this object if necessary. The default lower-limit is zero unless we are plotting an object that takes on negative values. This call transfers ownership of the plotable object to this class. The plotable object will be deleted when this plot object is deleted.

Definition at line 516 of file RooPlot.cxx.

◆ addTH1()

void RooPlot::addTH1 ( TH1 hist,
Option_t drawOptions = "",
bool  invisible = false 
)

Add a TH1 histogram object to this plot.

The specified options will be used to Draw() this object later. "SAME" will be added to the options if they are not already present. The caller transfers ownership of the object with this call, and the object will be deleted when its containing plot object is destroyed.

Definition at line 385 of file RooPlot.cxx.

◆ Browse()

void RooPlot::Browse ( TBrowser b)
overridevirtual

Plot RooPlot when double-clicked in browser.

Reimplemented from TObject.

Definition at line 1346 of file RooPlot.cxx.

◆ BuildLegend()

std::unique_ptr< TLegend > RooPlot::BuildLegend ( ) const

Build a legend that contains all objects that have been drawn on the plot.

Definition at line 1412 of file RooPlot.cxx.

◆ chiSquare() [1/2]

double RooPlot::chiSquare ( const char *  curvename,
const char *  histname,
int  nFitParam = 0 
) const

Calculate and return reduced chi-squared between a curve and a histogram.

Parameters
[in]curvenameName of the curve or nullptr for last curve
[in]histnameName of the histogram to compare to or nullptr for last added histogram
[in]nFitParamIf non-zero, reduce the number of degrees of freedom by this number. This means that the curve was fitted to the data with nFitParam floating parameters, which needs to be reflected in the calculation of \(\chi^2 / \mathrm{ndf}\).
Returns
\( \chi^2 / \mathrm{ndf} \) between the plotted curve and the data.
Note
The \( \chi^2 \) is calculated between a plot of the original distribution and the data. It therefore has more rounding errors than directly calculating the \( \chi^2 \) from a PDF or function. To do this, use RooAbsReal::createChi2(RooDataHist&, const RooCmdArg&, const RooCmdArg&, const RooCmdArg&, const RooCmdArg&, const RooCmdArg&, const RooCmdArg&, const RooCmdArg&, const RooCmdArg&).

Definition at line 1068 of file RooPlot.cxx.

◆ chiSquare() [2/2]

double RooPlot::chiSquare ( int  nFitParam = 0) const
inline

Shortcut for RooPlot::chiSquare(const char* pdfname, const char* histname, int nFitParam=nullptr)

Definition at line 180 of file RooPlot.h.

◆ Class()

static TClass * RooPlot::Class ( )
static
Returns
TClass describing this class

◆ Class_Name()

static const char * RooPlot::Class_Name ( )
static
Returns
Name of this class

◆ Class_Version()

static constexpr Version_t RooPlot::Class_Version ( )
inlinestaticconstexpr
Returns
Version of this class

Definition at line 256 of file RooPlot.h.

◆ createInternalPlotVarClone()

void RooPlot::createInternalPlotVarClone ( )

Replaces the pointer to the plot variable with a pointer to a clone of the plot variable that is owned by this RooPlot.

The RooPlot references the plotted variable by non-owning pointer by default since ROOT 6.28, which resulted in a big speedup when plotting complicated pdfs that are expensive to clone. However, going back to an owned clone is useful in rare cases. For example in the RooUnitTest, where the registered plots need to live longer than the scope of the unit test.

Definition at line 1437 of file RooPlot.cxx.

◆ DeclFileName()

static const char * RooPlot::DeclFileName ( )
inlinestatic
Returns
Name of the file containing the class declaration

Definition at line 256 of file RooPlot.h.

◆ defaultPrintContents()

Int_t RooPlot::defaultPrintContents ( Option_t opt) const
overridevirtual

Define default print options, for a given print style.

Reimplemented from RooPrintable.

Definition at line 1254 of file RooPlot.cxx.

◆ Draw()

void RooPlot::Draw ( Option_t option = nullptr)
overridevirtual

Draw this plot and all of the elements it contains.

The specified options only apply to the drawing of our frame. The options specified in our add...() methods will be used to draw each object we contain.

Reimplemented from TObject.

Definition at line 637 of file RooPlot.cxx.

◆ drawAfter()

bool RooPlot::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 after the specified object.

Returns false if either object does not exist.

Definition at line 921 of file RooPlot.cxx.

◆ drawBefore()

bool RooPlot::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 before the specified object.

Returns false if either object does not exist.

Definition at line 906 of file RooPlot.cxx.

◆ emptyClone()

RooPlot * RooPlot::emptyClone ( const char *  name)

Return empty clone of current RooPlot.

Definition at line 271 of file RooPlot.cxx.

◆ fillItemsFromTList()

void RooPlot::fillItemsFromTList ( RooPlot::Items items,
TList const &  tlist 
)
static

RooFit-internal function for backwards compatibility.

Definition at line 1424 of file RooPlot.cxx.

◆ findItem() [1/2]

RooPlot::Items::iterator RooPlot::findItem ( std::string const &  name)
protected

Definition at line 961 of file RooPlot.cxx.

◆ findItem() [2/2]

RooPlot::Items::const_iterator RooPlot::findItem ( std::string const &  name) const
protected

Definition at line 968 of file RooPlot.cxx.

◆ findObject()

TObject * RooPlot::findObject ( const char *  name,
const TClass tClass = nullptr 
) const

Find the named object in our list of items and return a pointer to it.

Return zero and print a warning message if the named object cannot be found. If no name is supplied the last object added is returned.

Note that the returned pointer is to a TObject and so will generally need casting. Use the getAtt...() methods to change the drawing style attributes of a contained object directly.

Definition at line 942 of file RooPlot.cxx.

◆ frame()

RooPlot * RooPlot::frame ( const RooAbsRealLValue var,
double  xmin,
double  xmax,
Int_t  nBins 
)
static

Create a new frame for a given variable in x.

This is just a wrapper for the RooPlot constructor with the same interface.

More details.

Parameters
[in]varThe variable on the x-axis
[in]xminLeft edge of the x-axis
[in]xmaxRight edge of the x-axis
[in]nBinsnumber of bins on the x-axis

Definition at line 225 of file RooPlot.cxx.

◆ frameWithLabels()

RooPlot * RooPlot::frameWithLabels ( const RooAbsRealLValue var)
static

Create a new frame for a given variable in x, adding bin labels.

The binning will be extracted from the variable given. The bin labels will be set as "%g-%g" for the left and right edges of each bin of the given variable.

More details.

Parameters
[in]varThe variable on the x-axis

Definition at line 237 of file RooPlot.cxx.

◆ getAttFill()

TAttFill * RooPlot::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 does not exist or does not have fill attributes.

Definition at line 817 of file RooPlot.cxx.

◆ getAttLine()

TAttLine * RooPlot::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 does not exist or does not have line attributes.

Definition at line 807 of file RooPlot.cxx.

◆ getAttMarker()

TAttMarker * RooPlot::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 object does not exist or does not have marker attributes.

Definition at line 827 of file RooPlot.cxx.

◆ getAttText()

TAttText * RooPlot::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 does not exist or does not have text attributes.

Definition at line 837 of file RooPlot.cxx.

◆ getCurve()

RooCurve * RooPlot::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 exist or is not a RooCurve.

Definition at line 848 of file RooPlot.cxx.

◆ getDrawOptions()

TString RooPlot::getDrawOptions ( const char *  name) const

Return the Draw() options registered for the named object.

Return an empty string if the named object cannot be found.

Definition at line 980 of file RooPlot.cxx.

◆ getFitRangeBinW()

double RooPlot::getFitRangeBinW ( ) const
inline

Return the bin width that is being used to normalise the PDF.

Definition at line 148 of file RooPlot.h.

◆ getFitRangeNEvt() [1/2]

double RooPlot::getFitRangeNEvt ( ) const
inline

Return the number of events in the fit range.

Definition at line 145 of file RooPlot.h.

◆ getFitRangeNEvt() [2/2]

double RooPlot::getFitRangeNEvt ( double  xlo,
double  xhi 
) const

Return the number of events that is associated with the range [xlo,xhi] This method is only fully functional for ranges not equal to the full range if the object that inserted the normalization data provided a link to an external object that can calculate the event count in in sub ranges.

An error will be printed if this function is used on sub-ranges while that information is not available

Definition at line 1205 of file RooPlot.cxx.

◆ getHist()

RooHist * RooPlot::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 exist or is not a RooCurve.

Definition at line 858 of file RooPlot.cxx.

◆ getInvisible()

bool RooPlot::getInvisible ( const char *  name) const

Returns true of object with given name is set to be invisible.

Definition at line 1008 of file RooPlot.cxx.

◆ GetMaximum()

double RooPlot::GetMaximum ( double  maxval = FLT_MAX) const
See also
TH1::GetMaximum()

Definition at line 1272 of file RooPlot.cxx.

◆ GetMinimum()

double RooPlot::GetMinimum ( double  minval = -FLT_MAX) const
See also
TH1::GetMinimum()

Definition at line 1270 of file RooPlot.cxx.

◆ GetNbinsX()

Int_t RooPlot::GetNbinsX ( ) const
See also
TH1::GetNbinsX()

Definition at line 1266 of file RooPlot.cxx.

◆ GetNdivisions()

Int_t RooPlot::GetNdivisions ( Option_t axis = "X") const
See also
TH1::GetNdivisions()

Definition at line 1268 of file RooPlot.cxx.

◆ getNormVars()

const RooArgSet * RooPlot::getNormVars ( ) const
inline

Definition at line 152 of file RooPlot.h.

◆ getObject()

TObject * RooPlot::getObject ( Int_t  idx) const

Return the name of the object at slot 'idx' in this RooPlot.

If the given index is out of range, return a null pointer

Definition at line 791 of file RooPlot.cxx.

◆ getPadFactor()

double RooPlot::getPadFactor ( ) const
inline

Definition at line 149 of file RooPlot.h.

◆ getPlotVar()

RooAbsRealLValue * RooPlot::getPlotVar ( ) const
inline

Definition at line 143 of file RooPlot.h.

◆ GetXaxis()

TAxis * RooPlot::GetXaxis ( ) const
See also
TH1::GetXaxis()

Definition at line 1262 of file RooPlot.cxx.

◆ GetYaxis()

TAxis * RooPlot::GetYaxis ( ) const
See also
TH1::GetYaxis()

Definition at line 1264 of file RooPlot.cxx.

◆ histName()

TString RooPlot::histName ( ) const
protected

Construct automatic name of internal TH1.

Definition at line 301 of file RooPlot.cxx.

◆ initialize()

void RooPlot::initialize ( )
protected

Perform initialization that is common to all constructors.

Definition at line 282 of file RooPlot.cxx.

◆ IsA()

TClass * RooPlot::IsA ( ) const
inlineoverridevirtual
Returns
TClass describing current object

Reimplemented from TObject.

Definition at line 256 of file RooPlot.h.

◆ nameOf()

const char * RooPlot::nameOf ( Int_t  idx) const

Return the name of the object at slot 'idx' in this RooPlot.

If the given index is out of range, return a null pointer

Definition at line 775 of file RooPlot.cxx.

◆ numItems()

Stat_t RooPlot::numItems ( ) const
inline

Definition at line 119 of file RooPlot.h.

◆ Print()

void RooPlot::Print ( Option_t option = nullptr) const
inlineoverridevirtual

This method must be overridden when a class wants to print itself.

Reimplemented from TObject.

Definition at line 138 of file RooPlot.h.

◆ printArgs()

void RooPlot::printArgs ( std::ostream &  os) const
overridevirtual

Interface for printing of object arguments.

Arguments are loosely defined as external server objects in this context

Reimplemented from RooPrintable.

Definition at line 696 of file RooPlot.cxx.

◆ printClassName()

void RooPlot::printClassName ( std::ostream &  os) const
overridevirtual

Print frame class name.

Reimplemented from RooPrintable.

Definition at line 687 of file RooPlot.cxx.

◆ printMultiline()

void RooPlot::printMultiline ( std::ostream &  os,
Int_t  content,
bool  verbose = false,
TString  indent = "" 
) const
overridevirtual

Frame detailed printing.

Reimplemented from RooPrintable.

Definition at line 738 of file RooPlot.cxx.

◆ printName()

void RooPlot::printName ( std::ostream &  os) const
overridevirtual

Print frame name.

Reimplemented from RooPrintable.

Definition at line 669 of file RooPlot.cxx.

◆ printTitle()

void RooPlot::printTitle ( std::ostream &  os) const
overridevirtual

Print frame title.

Reimplemented from RooPrintable.

Definition at line 678 of file RooPlot.cxx.

◆ printValue()

void RooPlot::printValue ( std::ostream &  os) const
overridevirtual

Print frame arguments.

Reimplemented from RooPrintable.

Definition at line 710 of file RooPlot.cxx.

◆ pullHist()

RooHist * RooPlot::pullHist ( const char *  histname = nullptr,
const char *  pdfname = nullptr,
bool  useAverage = true 
) const
inline

Uses residHist() and sets normalize=true.

Definition at line 185 of file RooPlot.h.

◆ remove()

void RooPlot::remove ( const char *  name = nullptr,
bool  deleteToo = true 
)

Remove object with given name, or last object added if no name is given.

Definition at line 868 of file RooPlot.cxx.

◆ residHist()

RooHist * RooPlot::residHist ( const char *  histname = nullptr,
const char *  curvename = nullptr,
bool  normalize = false,
bool  useAverage = true 
) const

Return a RooHist (derives from TGraphAsymErrors) containing the residuals of a histogram.

The plotting range of the graph is adapted to the plotting range of the current plot.

Parameters
histnameName of the data histogram. Passing an empty string or nullptr will create residuals of the last-plotted histogram.
curvenameName of the curve to compare to data. Passing an empty string or nullptr will create residuals of the last-plotted curve.
normalizeIf true, the residuals are divided by the error of the histogram, effectively returning a pull histogram.
useAverageIf true, the histogram is compared with the curve averaged in each bin. Otherwise, the curve is evaluated at the bin centres, which is not accurate for strongly curved distributions.

Definition at line 1101 of file RooPlot.cxx.

◆ setAddDirectoryStatus()

bool RooPlot::setAddDirectoryStatus ( bool  flag)
static

Configure whether new instances of RooPlot will add themselves to gDirectory.

Like TH1::AddDirectory().

Definition at line 78 of file RooPlot.cxx.

◆ SetAxisColor()

void RooPlot::SetAxisColor ( Color_t  color = 1,
Option_t axis = "X" 
)
See also
TH1::SetAxisColor()

Definition at line 1276 of file RooPlot.cxx.

◆ SetAxisRange()

void RooPlot::SetAxisRange ( double  xmin,
double  xmax,
Option_t axis = "X" 
)
See also
TH1::SetAxisRange()

Definition at line 1278 of file RooPlot.cxx.

◆ SetBarOffset()

void RooPlot::SetBarOffset ( Float_t  offset = 0.25)
See also
TH1::SetBarOffset()

Definition at line 1280 of file RooPlot.cxx.

◆ SetBarWidth()

void RooPlot::SetBarWidth ( Float_t  width = 0.5)
See also
TH1::SetBarWidth()

Definition at line 1282 of file RooPlot.cxx.

◆ SetContour()

void RooPlot::SetContour ( Int_t  nlevels,
const double levels = nullptr 
)
See also
TH1::SetContour()

Definition at line 1284 of file RooPlot.cxx.

◆ SetContourLevel()

void RooPlot::SetContourLevel ( Int_t  level,
double  value 
)
See also
TH1::SetContourLevel()

Definition at line 1286 of file RooPlot.cxx.

◆ SetDirectory()

void RooPlot::SetDirectory ( TDirectory dir)

Set the directory that this plot is associated to.

Setting it to nullptr will remove the object from all directories. Like TH1::SetDirectory.

Definition at line 333 of file RooPlot.cxx.

◆ SetDrawOption()

void RooPlot::SetDrawOption ( Option_t option = "")
overridevirtual
See also
TH1::SetDrawOption()

Reimplemented from TObject.

Definition at line 1288 of file RooPlot.cxx.

◆ setDrawOptions()

bool RooPlot::setDrawOptions ( const char *  name,
TString  options 
)

Register the specified drawing options for the named object.

Return false if the named object cannot be found.

Definition at line 993 of file RooPlot.cxx.

◆ SetFillAttributes()

void RooPlot::SetFillAttributes ( )
See also
TH1::SetFillAttributes()

Definition at line 1290 of file RooPlot.cxx.

◆ SetFillColor()

void RooPlot::SetFillColor ( Color_t  fcolor)
See also
TH1::SetFillColor()

Definition at line 1292 of file RooPlot.cxx.

◆ SetFillStyle()

void RooPlot::SetFillStyle ( Style_t  fstyle)
See also
TH1::SetFillStyle()

Definition at line 1294 of file RooPlot.cxx.

◆ setInvisible()

void RooPlot::setInvisible ( const char *  name,
bool  flag = true 
)

If flag is true object with 'name' is set to be invisible i.e.

it is not drawn when Draw() is called

Definition at line 1021 of file RooPlot.cxx.

◆ SetLabelColor()

void RooPlot::SetLabelColor ( Color_t  color = 1,
Option_t axis = "X" 
)
See also
TH1::SetLabelColor()

Definition at line 1296 of file RooPlot.cxx.

◆ SetLabelFont()

void RooPlot::SetLabelFont ( Style_t  font = 62,
Option_t axis = "X" 
)
See also
TH1::SetLabelFont()

Definition at line 1298 of file RooPlot.cxx.

◆ SetLabelOffset()

void RooPlot::SetLabelOffset ( Float_t  offset = 0.005,
Option_t axis = "X" 
)
See also
TH1::SetLabelOffset()

Definition at line 1300 of file RooPlot.cxx.

◆ SetLabelSize()

void RooPlot::SetLabelSize ( Float_t  size = 0.02,
Option_t axis = "X" 
)
See also
TH1::SetLabelSize()

Definition at line 1302 of file RooPlot.cxx.

◆ SetLineAttributes()

void RooPlot::SetLineAttributes ( )
See also
TH1::SetLineAttributes()

Definition at line 1304 of file RooPlot.cxx.

◆ SetLineColor()

void RooPlot::SetLineColor ( Color_t  lcolor)
See also
TH1::SetLineColor()

Definition at line 1306 of file RooPlot.cxx.

◆ SetLineStyle()

void RooPlot::SetLineStyle ( Style_t  lstyle)
See also
TH1::SetLineStyle()

Definition at line 1308 of file RooPlot.cxx.

◆ SetLineWidth()

void RooPlot::SetLineWidth ( Width_t  lwidth)
See also
TH1::SetLineWidth()

Definition at line 1310 of file RooPlot.cxx.

◆ SetMarkerAttributes()

void RooPlot::SetMarkerAttributes ( )
See also
TH1::SetMarkerAttributes()

Definition at line 1312 of file RooPlot.cxx.

◆ SetMarkerColor()

void RooPlot::SetMarkerColor ( Color_t  tcolor = 1)
See also
TH1::SetMarkerColor()

Definition at line 1314 of file RooPlot.cxx.

◆ SetMarkerSize()

void RooPlot::SetMarkerSize ( Size_t  msize = 1)
See also
TH1::SetMarkerSize()

Definition at line 1316 of file RooPlot.cxx.

◆ SetMarkerStyle()

void RooPlot::SetMarkerStyle ( Style_t  mstyle = 1)
See also
TH1::SetMarkerStyle()

Definition at line 1318 of file RooPlot.cxx.

◆ SetMaximum() [1/2]

void RooPlot::SetMaximum ( double  maximum = -1111)
virtual

Set maximum value of Y axis.

Definition at line 1037 of file RooPlot.cxx.

◆ SetMaximum() [2/2]

RooPlot::SetMaximum ( ymax  )

◆ SetMinimum() [1/2]

void RooPlot::SetMinimum ( double  minimum = -1111)
virtual

Set minimum value of Y axis.

Definition at line 1047 of file RooPlot.cxx.

◆ SetMinimum() [2/2]

RooPlot::SetMinimum ( ymin  )

◆ SetName() [1/2]

Use the constructor that doesn t take the name and and then call RooPlot::SetName ( )

◆ SetName() [2/2]

void RooPlot::SetName ( const char *  name)
overridevirtual

Set the name of the RooPlot to 'name'.

Reimplemented from TNamed.

Definition at line 1221 of file RooPlot.cxx.

◆ SetNameTitle()

void RooPlot::SetNameTitle ( const char *  name,
const char *  title 
)
overridevirtual

Set the name and title of the RooPlot to 'name' and 'title'.

Reimplemented from TNamed.

Definition at line 1232 of file RooPlot.cxx.

◆ SetNdivisions()

void RooPlot::SetNdivisions ( Int_t  n = 510,
Option_t axis = "X" 
)
See also
TH1::SetNdivisions()

Definition at line 1320 of file RooPlot.cxx.

◆ SetOption()

void RooPlot::SetOption ( Option_t option = " ")
See also
TH1::SetOption()

Definition at line 1322 of file RooPlot.cxx.

◆ setPadFactor()

void RooPlot::setPadFactor ( double  factor)
inline

Definition at line 150 of file RooPlot.h.

◆ SetStats()

void RooPlot::SetStats ( bool  stats = true)

Like TH1::SetStats(), but statistics boxes are off by default in RooFit.

Definition at line 1324 of file RooPlot.cxx.

◆ SetTickLength()

void RooPlot::SetTickLength ( Float_t  length = 0.02,
Option_t axis = "X" 
)
See also
TH1::SetTickLength()

Definition at line 1326 of file RooPlot.cxx.

◆ SetTitle()

void RooPlot::SetTitle ( const char *  name)
overridevirtual

Set the title of the RooPlot to 'title'.

Reimplemented from TNamed.

Definition at line 1243 of file RooPlot.cxx.

◆ SetTitleFont()

void RooPlot::SetTitleFont ( Style_t  font = 62,
Option_t axis = "X" 
)
See also
TH1::SetTitleFont()

Definition at line 1328 of file RooPlot.cxx.

◆ SetTitleOffset()

void RooPlot::SetTitleOffset ( Float_t  offset = 1,
Option_t axis = "X" 
)
See also
TH1::SetTitleOffset()

Definition at line 1330 of file RooPlot.cxx.

◆ SetTitleSize()

void RooPlot::SetTitleSize ( Float_t  size = 0.02,
Option_t axis = "X" 
)
See also
TH1::SetTitleSize()

Definition at line 1332 of file RooPlot.cxx.

◆ SetXTitle()

void RooPlot::SetXTitle ( const char *  title)
See also
TH1::SetXTitle()

Definition at line 1334 of file RooPlot.cxx.

◆ SetYTitle()

void RooPlot::SetYTitle ( const char *  title)
See also
TH1::SetYTitle()

Definition at line 1336 of file RooPlot.cxx.

◆ SetZTitle()

void RooPlot::SetZTitle ( const char *  title)
See also
TH1::SetZTitle()

Definition at line 1338 of file RooPlot.cxx.

◆ Streamer()

void RooPlot::Streamer ( TBuffer R__b)
overridevirtual

Stream an object of class TObject.

Reimplemented from TObject.

Definition at line 1357 of file RooPlot.cxx.

◆ StreamerNVirtual()

void RooPlot::StreamerNVirtual ( TBuffer ClassDef_StreamerNVirtual_b)
inline

Definition at line 256 of file RooPlot.h.

◆ updateFitRangeNorm() [1/2]

void RooPlot::updateFitRangeNorm ( const RooPlotable rp,
bool  refreshNorm = false 
)
protected

Update our plot normalization over our plot variable's fit range, which will be determined by the first suitable object added to our plot.

Definition at line 562 of file RooPlot.cxx.

◆ updateFitRangeNorm() [2/2]

void RooPlot::updateFitRangeNorm ( const TH1 hist)
protected

Update our plot normalization over our plot variable's fit range, which will be determined by the first suitable object added to our plot.

Definition at line 550 of file RooPlot.cxx.

◆ updateNormVars()

void RooPlot::updateNormVars ( const RooArgSet vars)

Install the given set of observables are reference normalization variables for this frame.

These observables are e.g. later used to automatically project out observables when plotting functions on this frame. This function is only effective when called the first time on a frame

Definition at line 351 of file RooPlot.cxx.

◆ updateYAxis()

void RooPlot::updateYAxis ( double  ymin,
double  ymax,
const char *  label = "" 
)
protected

Update our y-axis limits to accommodate an object whose spread in y is (ymin,ymax).

Use the specified y-axis label if we don't have one assigned already.

Definition at line 605 of file RooPlot.cxx.

Member Data Documentation

◆ _addDirStatus

bool RooPlot::_addDirStatus = true
staticprotected

static flag controlling AutoDirectoryAdd feature

Definition at line 254 of file RooPlot.h.

◆ _defYmax

double RooPlot::_defYmax = 1.0
protected

Default maximum for Yaxis (as calculated from contents)

Definition at line 250 of file RooPlot.h.

◆ _defYmin

double RooPlot::_defYmin = 1e-5
protected

Default minimum for Yaxis (as calculated from contents)

Definition at line 249 of file RooPlot.h.

◆ _dir

TDirectory* RooPlot::_dir = nullptr
protected

! non-persistent

Definition at line 252 of file RooPlot.h.

◆ _hist

TH1* RooPlot::_hist = nullptr
protected

Histogram that we uses as basis for drawing the content.

Definition at line 238 of file RooPlot.h.

◆ _items

Items RooPlot::_items
protected

A list of the items we contain.

Definition at line 239 of file RooPlot.h.

◆ _normBinWidth

double RooPlot::_normBinWidth = 0
protected

Histogram bin width (for normalization)

Definition at line 247 of file RooPlot.h.

◆ _normNumEvts

double RooPlot::_normNumEvts = 0
protected

Number of events in histogram (for normalization)

Definition at line 246 of file RooPlot.h.

◆ _normObj

const RooPlotable* RooPlot::_normObj = nullptr
protected

! Pointer to normalization object ;

Definition at line 245 of file RooPlot.h.

◆ _normVars

RooArgSet* RooPlot::_normVars = nullptr
protected

Variables that PDF plots should be normalized over.

Definition at line 243 of file RooPlot.h.

◆ _padFactor

double RooPlot::_padFactor
protected

Scale our y-axis to _padFactor of our maximum contents.

Definition at line 240 of file RooPlot.h.

◆ _plotVar

RooAbsRealLValue* RooPlot::_plotVar = nullptr
protected

The variable we are plotting.

Definition at line 241 of file RooPlot.h.

◆ _plotVarSet

RooArgSet* RooPlot::_plotVarSet = nullptr
protected

A list owning the cloned tree nodes of the plotVarClone.

Definition at line 242 of file RooPlot.h.

◆ title

Use the constructor that doesn t take the name and RooPlot::title

Definition at line 51 of file RooPlot.h.

Libraries for RooPlot:

The documentation for this class was generated from the following files: