Docs | All | Real | Category | PDF | DataSet | Plot | Container | Misc | Aux | User

RooFit Toolkit for Data Modeling
#include "RooCurve.hh"

RooCurve


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

class RooCurve : public TGraph, public RooPlotable

Inheritance Chart:
TObject
<-
TNamed
TAttLine
TAttFill
TAttMarker
<-
TGraph
RooPrintable
<-
RooPlotable
<-
RooCurve

    protected:
void addPoints(const RooAbsFunc& func, Double_t xlo, Double_t xhi, Int_t minPoints, Double_t prec, Double_t resolution, RooCurve::WingMode wmode) void addRange(const RooAbsFunc& func, Double_t x1, Double_t x2, Double_t y1, Double_t y2, Double_t minDy, Double_t minDx) void initialize() void shiftCurveToZero(Double_t prevYMax) public:
RooCurve() RooCurve(const RooAbsReal& func, RooAbsRealLValue& x, Double_t xlo, Double_t xhi, Int_t xbins, Double_t scaleFactor = 1, const RooArgSet* normVars = 0, Double_t prec = 1e-3, Double_t resolution = 1e-3, Bool_t shiftToZero = kFALSE, RooCurve::WingMode wmode = Extended) RooCurve(const char* name, const char* title, const RooAbsFunc& func, Double_t xlo, Double_t xhi, UInt_t minPoints, Double_t prec = 1e-3, Double_t resolution = 1e-3, Bool_t shiftToZero = kFALSE, RooCurve::WingMode wmode = Extended) RooCurve(const char* name, const char* title, const RooCurve& c1, const RooCurve& c2, Double_t scale1 = 1., Double_t scale2 = 1.) RooCurve(const RooCurve&) virtual ~RooCurve() void addPoint(Double_t x, Double_t y) Double_t average(Double_t lo, Double_t hi) const Double_t chiSquare(const RooHist& hist, int nFitParam) const static TClass* Class() Int_t findPoint(Double_t value, Double_t tolerance = 1e-10) const virtual Double_t getFitRangeBinW() const virtual Double_t getFitRangeNEvt(Double_t xlo, Double_t xhi) const virtual Double_t getFitRangeNEvt() const Double_t interpolate(Double_t x, Double_t tolerance = 1e-10) const virtual TClass* IsA() const RooCurve& operator=(const RooCurve&) virtual void Print(Option_t* options = "0") const virtual void printToStream(ostream& os, RooPrintable::PrintOption opt = Standard, TString indent = ) const virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members


    public:
static const RooCurve::WingMode NoWings static const RooCurve::WingMode Straight static const RooCurve::WingMode Extended

Class Description

 A RooCurve is a one-dimensional graphical representation of a real-valued function.
 A curve is approximated by straight line segments with endpoints chosen to give
 a "good" approximation to the true curve. The goodness of the approximation is
 controlled by a precision and a resolution parameter. To view the points where
 a function y(x) is actually evaluated to approximate a smooth curve, use:

  RooPlot *p= y.plotOn(x.frame());
  p->getAttMarker("curve_y")->SetMarkerStyle(20);
  p->setDrawOptions("curve_y","PL");
  p->Draw();

RooCurve()

RooCurve(const RooAbsReal &f, RooAbsRealLValue &x, Double_t xlo, Double_t xhi, Int_t xbins, Double_t scaleFactor, const RooArgSet *normVars, Double_t prec, Double_t resolution, Bool_t shiftToZero, WingMode wmode)
 Create a 1-dim curve of the value of the specified real-valued expression
 as a function of x. Use the optional precision parameter to control
 how precisely the smooth curve is rasterized. Use the optional argument set
 to specify how the expression should be normalized. Use the optional scale
 factor to rescale the expression after normalization.
 If shiftToZero is set, the entire curve is shift down to make the lowest
 point in of the curve go through zero.

RooCurve(const char *name, const char *title, const RooAbsFunc &func, Double_t xlo, Double_t xhi, UInt_t minPoints, Double_t prec, Double_t resolution, Bool_t shiftToZero, WingMode wmode)

RooCurve(const char* name, const char* title, const RooCurve& c1, const RooCurve& c2, Double_t scale1, Double_t scale2)

~RooCurve()

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

void shiftCurveToZero(Double_t prevYMax) // Find lowest point in curve and move all points in curve so that // lowest point will go exactly through zero

void addPoints(const RooAbsFunc &func, Double_t xlo, Double_t xhi, Int_t minPoints, Double_t prec, Double_t resolution, WingMode wmode)
 Add points calculated with the specified function, over the range (xlo,xhi).
 Add at least minPoints equally spaced points, and add sufficient points so that
 the maximum deviation from the final straight-line segements is prec*(ymax-ymin),
 down to a minimum horizontal spacing of resolution*(xhi-xlo).

void addRange(const RooAbsFunc& func, Double_t x1, Double_t x2, Double_t y1, Double_t y2, Double_t minDy, Double_t minDx)
 Fill the range (x1,x2) with points calculated using func(&x). No point will
 be added at x1, and a point will always be added at x2. The density of points
 will be calculated so that the maximum deviation from a straight line
 approximation is prec*(ymax-ymin) down to the specified minimum horizontal spacing.

void addPoint(Double_t x, Double_t y)
 Add a point with the specified coordinates. Update our y-axis limits.

Double_t getFitRangeNEvt() const

Double_t getFitRangeNEvt(Double_t, Double_t) const

Double_t getFitRangeBinW() const

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

   Standard: number of entries
    Verbose: print points on curve

Double_t chiSquare(const RooHist& hist, Int_t nFitParam) const

Double_t average(Double_t xFirst, Double_t xLast) const
 Average curve between given values by integrating curve between points
 and dividing by xLast-xFirst

Int_t findPoint(Double_t xvalue, Double_t tolerance) const

Double_t interpolate(Double_t xvalue, Double_t tolerance) const
 Find best point



Inline Functions


               void Print(Option_t* options = "0") const
            TClass* Class()
            TClass* IsA() const
               void ShowMembers(TMemberInspector& insp, char* parent)
               void Streamer(TBuffer& b)
               void StreamerNVirtual(TBuffer& b)
           RooCurve RooCurve(const RooCurve&)
          RooCurve& operator=(const RooCurve&)
Last CVS Update: v 1.48 2005/06/23 07:37:30 wverkerke Top
Copyright © 2000-2005 University of California, Stanford University

Page maintained by Wouter Verkerke and David Kirkby

SourceForge.net Logo