library: libRooFit
#include "RooPlot.h"

RooPlot


class description - source file - inheritance tree (.pdf)

class RooPlot : public TH1, public RooPrintable

Inheritance Chart:
TObject
<-
TNamed
TAttLine
TAttFill
TAttMarker
<-
TH1
RooPrintable
<-
RooPlot

    protected:
RooPlot(const RooPlot& other) TString caller(const char* method) const TString histName() const void initialize() void updateFitRangeNorm(const TH1* hist) void updateFitRangeNorm(const RooPlotable* rp, Bool_t refeshNorm = kFALSE) void updateYAxis(Double_t ymin, Double_t ymax, const char* label = "") public:
RooPlot(const char* name, const char* title, const RooAbsRealLValue& var, Double_t xmin, Double_t xmax, Int_t nBins) RooPlot(const RooAbsRealLValue& var, Double_t xmin, Double_t xmax, Int_t nBins) RooPlot(Double_t xmin = 0, Double_t xmax = 1) RooPlot(Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax) RooPlot(const RooAbsRealLValue& var1, const RooAbsRealLValue& var2) RooPlot(const RooAbsRealLValue& var1, const RooAbsRealLValue& var2, Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax) virtual ~RooPlot() void addObject(TObject* obj, Option_t* drawOptions = "", Bool_t invisible = kFALSE) void addPlotable(RooPlotable* plotable, Option_t* drawOptions = "", Bool_t invisible = kFALSE, Bool_t refreshNorm = kFALSE) void addTH1(TH1* hist, Option_t* drawOptions = "", Bool_t invisible = kFALSE) Double_t chiSquare(int nFitParam = 0) const Double_t chiSquare(const char* pdfname, const char* histname, int nFitParam = 0) const static TClass* Class() virtual void Draw(Option_t* options = "0") Bool_t drawAfter(const char* after, const char* target) Bool_t drawBefore(const char* before, const char* target) TObject* findObject(const char* name, const TClass* clas = 0) const TAttFill* getAttFill(const char* name = "0") const TAttLine* getAttLine(const char* name = "0") const TAttMarker* getAttMarker(const char* name = "0") const TAttText* getAttText(const char* name = "0") const virtual Stat_t GetBinContent(Int_t) const virtual Stat_t GetBinContent(Int_t, Int_t) const virtual Stat_t GetBinContent(Int_t, Int_t, Int_t) const RooCurve* getCurve(const char* name = "0") const TString getDrawOptions(const char* name) const Double_t getFitRangeBinW() const Double_t getFitRangeNEvt() const Double_t getFitRangeNEvt(Double_t xlo, Double_t xhi) const RooHist* getHist(const char* name = "0") const Bool_t getInvisible(const char* name) const const RooArgSet* getNormVars() const TObject* getObject(Int_t idx) const Double_t getPadFactor() const RooAbsRealLValue* getPlotVar() const virtual TClass* IsA() const const char* nameOf(Int_t idx) const Stat_t numItems() const virtual void Print(Option_t* options = "0") const virtual void printToStream(ostream& os, RooPrintable::PrintOption opt = Standard, TString indent = ) const RooHist* pullHist(const char* histname = "0", const char* pdfname = "0") const Bool_t setDrawOptions(const char* name, TString options) void setInvisible(const char* name, Bool_t flag = kTRUE) virtual void SetMaximum(Double_t maximum = -1111) virtual void SetMinimum(Double_t minimum = -1111) void setPadFactor(Double_t factor) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b) void updateNormVars(const RooArgSet& vars)

Data Members


    protected:
RooList _items A list of the items we contain. Double_t _padFactor Scale our y-axis to _padFactor of our maximum contents. RooAbsRealLValue* _plotVarClone A clone of the variable we are plotting. RooArgSet* _plotVarSet A list owning the cloned tree nodes of the plotVarClone RooArgSet* _normVars Variables that PDF plots should be normalized over const RooPlotable* _normObj ! Pointer to normalization object ; Double_t _normNumEvts Number of events in histogram (for normalization) Double_t _normBinWidth Histogram bin width (for normalization) TIterator* _iterator ! non-persistent Double_t _defYmin Default minimum for Yaxis (as calculated from contents) Double_t _defYmax Default maximum for Yaxis (as calculated from contents)

Class Description


RooPlot(Double_t xmin, Double_t xmax) : TH1(histName(),"A RooPlot",100,xmin,xmax), _items(), _plotVarClone(0), _plotVarSet(0), _normObj(0), _defYmin(1e-5), _defYmax(1)
 Create an empty frame with the specified x-axis limits.

RooPlot(Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax) : TH1(histName(),"A RooPlot",100,xmin,xmax), _items(), _plotVarClone(0), _plotVarSet(0), _normObj(0), _defYmin(1e-5), _defYmax(0)
 Create an empty frame with the specified x- and y-axis limits.

RooPlot(const RooAbsRealLValue &var1, const RooAbsRealLValue &var2) : TH1(histName(),"A RooPlot",100,var1.getMin(),var1.getMax()), _items(), _plotVarClone(0), _plotVarSet(0), _normObj(0), _defYmin(1e-5), _defYmax(0)
 Create an empty frame with the specified x- and y-axis limits
 and with labels determined by the specified variables.

RooPlot(const RooAbsRealLValue &var1, const RooAbsRealLValue &var2, Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax) : TH1(histName(),"A RooPlot",100,xmin,xmax), _items(), _plotVarClone(0), _plotVarSet(0), _normObj(0), _defYmin(1e-5), _defYmax(0)
 Create an empty frame with the specified x- and y-axis limits
 and with labels determined by the specified variables.

RooPlot(const char* name, const char* title, const RooAbsRealLValue &var, Double_t xmin, Double_t xmax, Int_t nbins) : TH1(name,title,nbins,xmin,xmax), _items(), _plotVarClone(0), _plotVarSet(0), _normObj(0), _defYmin(1e-5), _defYmax(1)
 Create an empty frame with its title and x-axis range and label taken
 from the specified real variable. We keep a clone of the variable
 so that we do not depend on its lifetime and are decoupled from
 any later changes to its state.

RooPlot(const RooAbsRealLValue &var, Double_t xmin, Double_t xmax, Int_t nbins) : TH1(histName(),"RooPlot",nbins,xmin,xmax), _items(), _plotVarClone(0), _plotVarSet(0), _normObj(0), _defYmin(1e-5), _defYmax(1)
 Create an empty frame with its title and x-axis range and label taken
 from the specified real variable. We keep a clone of the variable
 so that we do not depend on its lifetime and are decoupled from
 any later changes to its state.

void initialize()
 Perform initialization that is common to all constructors.

TString histName() const

~RooPlot()
 Delete the items in our container and our iterator.

void updateNormVars(const RooArgSet &vars)

Stat_t GetBinContent(Int_t /*i*/) const
 A plot object is a frame without any bin contents of its own so this
 method always returns zero.

Stat_t GetBinContent(Int_t, Int_t) const
 A plot object is a frame without any bin contents of its own so this
 method always returns zero.

Stat_t GetBinContent(Int_t, Int_t, Int_t) const
 A plot object is a frame without any bin contents of its own so this
 method always returns zero.

void addObject(TObject *obj, Option_t *drawOptions, Bool_t invisible)
 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.

void addTH1(TH1 *hist, Option_t *drawOptions, Bool_t invisible)
 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. Note that histograms
 should probably not be drawn with error bars since they will not
 be calculated correctly for bins with low statistics, and will
 not be accounted for in the automatic y-axis range adjustment. To
 histogram data in a RooDataSet without these problems, use
 RooDataSet::plotOn(). The caller transfers ownership of the
 object with this call, and the object will be deleted when its
 containing plot object is destroyed.

void addPlotable(RooPlotable *plotable, Option_t *drawOptions, Bool_t invisible, Bool_t refreshNorm)
 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.

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 updateFitRangeNorm(const RooPlotable* rp, Bool_t refreshNorm)
 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_t ymin, Double_t ymax, const char *label)
 Update our y-axis limits to accomodate an object whose spread
 in y is (ymin,ymax). Use the specified y-axis label if we don't
 have one assigned already.

void Draw(Option_t *options)
 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.

void printToStream(ostream& os, PrintOption opt, TString indent) const
 Print info about this plot object to the specified stream.

  Standard: plot variable and number of contained objects
     Shape: list of our contained objects

const char* 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

TObject* 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

TAttLine* getAttLine(const char *name) 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.

TAttFill* getAttFill(const char *name) 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.

TAttMarker* getAttMarker(const char *name) 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.

TAttText* getAttText(const char *name) 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.

RooCurve* getCurve(const char* name) 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

RooHist* getHist(const char* name) 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_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 before the specified object.
 Returns kFALSE if either object does not exist.

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 after the specified object.
 Returns kFALSE if either object does not exist.

TObject* findObject(const char *name, const TClass* clas) 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.

TString 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.

Bool_t setDrawOptions(const char *name, TString options)
 Register the specified drawing options for the named object.
 Return kFALSE if the named object cannot be found.

Bool_t getInvisible(const char* name) const

void setInvisible(const char* name, Bool_t flag)

TString caller(const char *method) const

void SetMaximum(Double_t maximum)

void SetMinimum(Double_t minimum)

Double_t chiSquare(const char* curvename, const char* histname, Int_t nFitParam) const
 Find curve object

RooHist* pullHist(const char* histname, const char* curvename) const
 Find curve object

Double_t getFitRangeNEvt(Double_t xlo, Double_t xhi) const



Inline Functions


                   Stat_t numItems() const
                     void Print(Option_t* options = "0") const
        RooAbsRealLValue* getPlotVar() const
                 Double_t getFitRangeNEvt(Double_t xlo, Double_t xhi) const
                 Double_t getFitRangeBinW() const
                 Double_t getPadFactor() const
                     void setPadFactor(Double_t factor)
         const RooArgSet* getNormVars() const
                 Double_t chiSquare(const char* pdfname, const char* histname, int nFitParam = 0) const
                  RooPlot RooPlot(const RooPlot& other)
                  TClass* Class()
                  TClass* IsA() const
                     void ShowMembers(TMemberInspector& insp, char* parent)
                     void Streamer(TBuffer& b)
                     void StreamerNVirtual(TBuffer& b)


Last update: Tue Jun 28 18:14:20 2005
Copyright (c) 2000-2005, Regents of the University of California *


ROOT page - Class index - Class Hierarchy - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.