library: libRooFit #include "RooRealVar.h"

# RooRealVar

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

## class RooRealVar : public RooAbsRealLValue

| Inheritance Chart:
`TObject`
| <- | `TNamed`
`RooPrintable`
| <- | `RooAbsArg`
| <- | `RooAbsReal`
`RooAbsLValue`
| <- | `RooAbsRealLValue`
| <- | `RooRealVar` |

        protected:

              virtual void attachToTree(TTree& t, Int_t bufSize = 32000)
                  Double_t chopAt(Double_t what, Int_t where) const
              virtual void copyCache(const RooAbsArg* source)
          virtual Double_t evaluate() const
              virtual void fillTreeBranch(TTree& t)

        public:

                                       RooRealVar()
                                       RooRealVar(const char* name, const char* title, Double_t value, const char* unit = "")
                                       RooRealVar(const char* name, const char* title, Double_t minValue, Double_t maxValue, const char* unit = "")
                                       RooRealVar(const char* name, const char* title, Double_t value, Double_t minValue, Double_t maxValue, const char* unit = "")
                                       RooRealVar(const RooRealVar& other, const char* name = "0")
                               virtual ~RooRealVar()
                        static TClass* Class()
                      virtual TObject* clone(const char* newname) const
                          RooErrorVar* errorVar() const
                              TString* format(const RooCmdArg& formatArg) const
                              TString* format(Int_t sigDigits, const char* options) const
                              Double_t getAsymErrorHi() const
                              Double_t getAsymErrorLo() const
          virtual const RooAbsBinning& getBinning(const char* name = "0", Bool_t verbose = kTRUE, Bool_t createOnTheFly = kFALSE) const
                virtual RooAbsBinning& getBinning(const char* name = "0", Bool_t verbose = kTRUE, Bool_t createOnTheFly = kFALSE)
                              Double_t getError() const
                      virtual Double_t getVal(const RooArgSet* nset = 0) const
                                Bool_t hasAsymError() const
                        virtual Bool_t hasBinning(const char* name) const
                                Bool_t hasError() const
                       virtual TClass* IsA() const
                        virtual Bool_t isFundamental() const
                           static void printScientific(Bool_t flag = kFALSE)
                           static void printSigDigits(Int_t ndig = 5)
                          virtual void printToStream(ostream& stream, RooPrintable::PrintOption opt = Standard, TString indent = ) const
                        virtual Bool_t readFromStream(istream& is, Bool_t compact, Bool_t verbose = kFALSE)
                                  void removeAsymError()
                                  void removeError()
                                  void removeFitMax()
                                  void removeFitMin()
                                  void removeFitRange()
                                  void removeMax(const char* name = "0")
                                  void removeMin(const char* name = "0")
                                  void removeRange(const char* name = "0")
                                  void setAsymError(Double_t lo, Double_t hi)
                                  void setBinning(const RooAbsBinning& binning, const char* name = "0")
                                  void setBins(Int_t nBins)
                                  void setError(Double_t value)
                                  void setFitBins(Int_t nBins)
                                  void setFitMax(Double_t value)
                                  void setFitMin(Double_t value)
                                  void setFitRange(Double_t min, Double_t max)
                                  void setMax(const char* name, Double_t value)
                                  void setMax(Double_t value)
                                  void setMin(const char* name, Double_t value)
                                  void setMin(Double_t value)
                                  void setRange(const char* name, Double_t min, Double_t max)
                                  void setRange(Double_t min, Double_t max)
                          virtual void setVal(Double_t value)
                          virtual void ShowMembers(TMemberInspector& insp, char* parent)
                          virtual void Streamer(TBuffer& b)
                                  void StreamerNVirtual(TBuffer& b)
                          virtual void writeToStream(ostream& os, Bool_t compact) const

### Data Members

        protected:

           static Bool_t _printScientific
            static Int_t _printSigDigits
           RooLinkedList _altBinning       ! Optional alternative ranges and binnings
                Double_t _error            Symmetric error associated with current value
                Double_t _asymErrLo        Low side of asymmetric error associated with current value
                Double_t _asymErrHi        High side of asymmetric error associated with current value
          RooAbsBinning* _binning

## Class Description

     This class also holds an error and a fit range associated with the real value

RooRealVar()

     Default constructor

RooRealVar(const char *name, const char *title, Double_t value, const char *unit) : RooAbsRealLValue(name, title, unit), _error(-1), _asymErrLo(1), _asymErrHi(-1) //, _fitBins(100)

     Constructor with value and unit

RooRealVar(const char *name, const char *title, Double_t minValue, Double_t maxValue, const char *unit) : RooAbsRealLValue(name, title, unit), _error(-1), _asymErrLo(1), _asymErrHi(-1) // , _fitBins(100)

     Constructor with range and unit. Value is set to middle of range

RooRealVar(const char *name, const char *title, Double_t value, Double_t minValue, Double_t maxValue, const char *unit) : RooAbsRealLValue(name, title, unit), _error(-1), _asymErrLo(1), _asymErrHi(-1) //, _fitBins(100)

     Constructor with value, range and unit

RooRealVar(const RooRealVar& other, const char* name) : RooAbsRealLValue(other,name), _error(other._error), _asymErrLo(other._asymErrLo), _asymErrHi(other._asymErrHi)

     Copy Constructor

~RooRealVar()

     Destructor

Double_t getVal(const RooArgSet*) const

void setVal(Double_t value)

     Set current value

RooErrorVar* errorVar() const

Bool_t hasBinning(const char* name) const

const RooAbsBinning& getBinning(const char* name, Bool_t verbose, Bool_t createOnTheFly) const

RooAbsBinning& getBinning(const char* name, Bool_t verbose, Bool_t createOnTheFly)

     Return default (normalization) binning and range if no name is specified

void setBinning(const RooAbsBinning& binning, const char* name)

void setMin(const char* name, Double_t value)

     Set new minimum of fit range

void setMax(const char* name, Double_t value)

     Set new maximum of fit range

void setRange(const char* name, Double_t min, Double_t max)

Bool_t readFromStream(istream& is, Bool_t compact, Bool_t verbose)

     Read object contents from given stream

void writeToStream(ostream& os, Bool_t compact) const

     Write object contents to given stream

void printToStream(ostream& os, PrintOption opt, TString indent) const

     Print info about this object to the specified stream. In addition to the info
     from RooAbsRealLValue::printToStream() we add:

       Verbose : fit range and error

TString* format(const RooCmdArg& formatArg) const

TString* format(Int_t sigDigits, const char *options) const

     Format numeric value in a variety of ways

     What is shown?
     N = show name
     H = hide value
     E = show error
     A = show asymmetric error instead of parabolic error (if available)
     U = show unit

     How is it shown?
     L = TLatex mode
     X = Latex mode
     Y = Latex table mode ( '=' replaced by '&' )
     V = Make name \verbatim in Latex mode
     P = use error to control shown precision
     F = force fixed precision

Double_t chopAt(Double_t what, Int_t where) const

     What does this do?

void attachToTree(TTree& t, Int_t bufSize)

     Follow usual procedure for value

void fillTreeBranch(TTree& t)

     Attach object to a branch of given TTree

void copyCache(const RooAbsArg* source)

     Copy the cached value of another RooAbsArg to our cache

void Streamer(TBuffer &R__b)

     Stream an object of class RooRealVar.

void setFitBins(Int_t nBins)

void setFitMin(Double_t value)

void setFitMax(Double_t value)

void setFitRange(Double_t min, Double_t max)

void removeFitMin()

void removeFitMax()

void removeFitRange()

### Inline Functions

               TObject* clone(const char* newname) const
               Double_t getError() const
                 Bool_t hasError() const
                   void setError(Double_t value)
                   void removeError()
               Double_t getAsymErrorLo() const
               Double_t getAsymErrorHi() const
                 Bool_t hasAsymError() const
                   void removeAsymError()
                   void setAsymError(Double_t lo, Double_t hi)
                   void setMin(Double_t value)
                   void setMax(Double_t value)
                   void setRange(Double_t min, Double_t max)
                   void setBins(Int_t nBins)
                   void removeMin(const char* name = "0")
                   void removeMax(const char* name = "0")
                   void removeRange(const char* name = "0")
                 Bool_t isFundamental() const
                   void printScientific(Bool_t flag = kFALSE)
                   void printSigDigits(Int_t ndig = 5)
               Double_t evaluate() const
                TClass* Class()
                TClass* IsA() const
                   void ShowMembers(TMemberInspector& insp, char* parent)
                   void StreamerNVirtual(TBuffer& b)

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