|
ROOT
Reference Guide |
|
Go to the documentation of this file.
49 struct TreeReadBuffer;
67 RooAbsReal(
const char *
name,
const char *title,
const char *unit=
"") ;
69 const char *unit=
"") ;
92 #ifdef ROOFIT_CHECK_CACHED_VALUES
119 throw std::logic_error(
"Deprecated getValBatch() has been removed in favour of the faster getValues(). If your code is affected by this change, please consult the release notes for ROOT 6.24 for guidance on how to make this transition. https://root.cern/doc/v624/release-notes.html");
295 virtual void printValue(std::ostream& os)
const ;
314 void logEvalError(
const char* message,
const char* serverValueString=0)
const ;
315 static void logEvalError(
const RooAbsReal* originator,
const char* origName,
const char* message,
const char* serverValueString=0) ;
321 typedef std::map<const RooAbsArg*,std::pair<std::string,std::list<EvalError> > >::const_iterator
EvalErrorIter ;
428 throw std::logic_error(
"Deprecated evaluatedBatch() has been removed in favour of the faster evaluateSpan(). If your code is affected by this change, please consult the release notes for ROOT 6.24 for guidance on how to make this transition. https://root.cern/doc/v624/release-notes.html");
523 static std::map<const RooAbsArg*,std::pair<std::string,std::list<EvalError> > >
_evalErrorList ;
573 const RooArgSet* normSet =
nullptr,
double relAccuracy = 1.E-13) {
virtual Double_t analyticalIntegral(Int_t code, const char *rangeName=0) const
Implements the actual analytical integral(s) advertised by getAnalyticalIntegral.
virtual Bool_t setData(RooAbsData &, Bool_t=kTRUE)
virtual void copyCache(const RooAbsArg *source, Bool_t valueOnly=kFALSE, Bool_t setValDirty=kTRUE)
Copy the cached value of another RooAbsArg to our cache.
virtual RooSpan< double > evaluateSpan(RooBatchCompute::RunContext &evalData, const RooArgSet *normSet) const
Evaluate this object for a batch/span of data points.
virtual ~RooAbsReal()
Destructor.
Lightweight interface adaptor that exports a RooAbsReal as a ROOT::Math::IMultiGenFunction.
virtual void selectNormalization(const RooArgSet *depSet=0, Bool_t force=kFALSE)
Interface function to force use of a given set of observables to interpret function value.
RooCmdArg is a named container for two doubles, two integers two object points and three string point...
static Bool_t _inhibitDirty
const char * curveNameSuffix
static void printEvalErrors(std::ostream &os=std::cout, Int_t maxPerNode=10000000)
Print all outstanding logged evaluation error on the given ostream.
static void setEvalErrorLoggingMode(ErrorLoggingMode m)
Set evaluation error logging mode.
RooAddPdf is an efficient implementation of a sum of PDFs of the form.
Double_t getPropagatedError(const RooFitResult &fr, const RooArgSet &nset=RooArgSet()) const
Calculate error on self by linearly propagating errors on parameters using the covariance matrix from...
virtual std::list< Double_t > * plotSamplingHint(RooAbsRealLValue &obs, Double_t xlo, Double_t xhi) const
Interface for returning an optional hint for initial sampling points when constructing a curve projec...
RooAbsReal * createIntegral(const RooArgSet &iset, const RooArgSet &nset, const char *rangeName=0) const
Create integral over observables in iset in range named rangeName with integrand normalized over obse...
void logEvalError(const char *message, const char *serverValueString=0) const
Log evaluation error message.
RooAbsData is the common abstract base class for binned and unbinned datasets.
Lightweight interface adaptor that exports a RooAbsReal as a ROOT::Math::IGenFunction.
static ErrorLoggingMode _evalErrorMode
RooDerivative represents the first, second, or third order derivative of any RooAbsReal as calculated...
GlobalSelectComponentRAII(bool state)
RooFunctor * functor(const RooArgList &obs, const RooArgList &pars=RooArgList(), const RooArgSet &nset=RooArgSet()) const
Return a RooFunctor object bound to this RooAbsReal with given definition of observables and paramete...
virtual void syncCache(const RooArgSet *set=0)
2-D histogram with a float per channel (see TH1 documentation)}
virtual Bool_t isBinnedDistribution(const RooArgSet &) const
Tests if the distribution is binned. Unless overridden by derived classes, this always returns false.
virtual void writeToStream(std::ostream &os, Bool_t compact) const
Write object contents to stream (dummy for now)
const char * Data() const
RooAbsReal * createIntegral(const RooArgSet &iset, const RooNumIntConfig &cfg, const char *rangeName=0) const
Create integral over observables in iset in range named rangeName using specified configuration for a...
RooAbsMoment * sigma(RooRealVar &obs)
RooAbsReal * createIntegral(const RooArgSet &iset, const RooCmdArg &arg1, const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none()) const
Create an object that represents the integral of the function over one or more observables listed in ...
virtual Double_t getValV(const RooArgSet *normalisationSet=nullptr) const
Return value of object.
Bool_t operator==(Double_t value) const
Equality operator comparing to a Double_t.
const char * projectionRangeName
virtual RooSpan< double > evaluateBatch(std::size_t, std::size_t)=delete
virtual std::list< Double_t > * binBoundaries(RooAbsRealLValue &obs, Double_t xlo, Double_t xhi) const
Retrieve bin boundaries if this distribution is binned in obs.
const char * getPlotLabel() const
Get the label associated with the variable.
RooArgList is a container object that can hold multiple RooAbsArg objects.
virtual void attachToTree(TTree &t, Int_t bufSize=32000)
Attach object to a branch of given TTree.
A TTree represents a columnar dataset.
virtual Double_t defaultErrorLevel() const
void setServerValues(const char *tmp)
Bool_t plotSanityChecks(RooPlot *frame) const
Utility function for plotOn(), perform general sanity check on frame to ensure safe plotting operatio...
static void checkBatchComputation(const RooAbsReal &theReal, const RooBatchCompute::RunContext &evalData, std::size_t evtNo, const RooArgSet *normSet=nullptr, double relAccuracy=1.E-13)
Double_t getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
const RooArgSet * projDataSet
static constexpr double s
Bool_t isSelectedComp() const
If true, the current pdf is a selected component (for use in plotting)
void makeProjectionSet(const RooAbsArg *plotVar, const RooArgSet *allVars, RooArgSet &projectedVars, Bool_t silent) const
Utility function for plotOn() that constructs the set of observables to project when plotting ourselv...
Double_t getVal(const RooArgSet &normalisationSet) const
Like getVal(const RooArgSet*), but always requires an argument for normalisation.
void setPlotLabel(const char *label)
Set the label associated with this variable.
std::unique_ptr< TreeReadBuffer > _treeReadBuffer
static void indent(ostringstream &buf, int indent_level)
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
const RooNumIntConfig * getIntegratorConfig() const
Return the numeric integration configuration used for this object.
static ErrorLoggingMode evalErrorLoggingMode()
Return current evaluation error logging mode.
virtual RooSpan< const double > getValBatch(std::size_t, std::size_t, const RooArgSet *=nullptr)=delete
RooAbsMoment represents the first, second, or third order derivative of any RooAbsReal as calculated ...
virtual Bool_t isValidReal(Double_t value, Bool_t printError=kFALSE) const
Interface function to check if given value is a valid value for this object.
Bool_t inhibitDirty() const
Delete watch flag.
virtual Bool_t isOffsetting() const
RooPlot * plotOnWithErrorBand(RooPlot *frame, const RooFitResult &fr, Double_t Z, const RooArgSet *params, const RooLinkedList &argList, Bool_t method1) const
Plot function or PDF on frame with support for visualization of the uncertainty encoded in the given ...
virtual void selectNormalizationRange(const char *rangeName=0, Bool_t force=kFALSE)
Interface function to force use of a given normalization range to interpret function value.
RooAbsMoment * mean(RooRealVar &obs)
virtual void printValue(std::ostream &os) const
Print object value.
static Bool_t _globalSelectComp
Component selection flag for RooAbsPdf::plotCompOn.
static const RooCmdArg & none()
Return reference to null argument.
virtual void fixAddCoefNormalization(const RooArgSet &addNormSet=RooArgSet(), Bool_t force=kTRUE)
Fix the interpretation of the coefficient of any RooAddPdf component in the expression tree headed by...
const RooAbsData * projData
static void clearEvalErrorLog()
Clear the stack of evaluation error messages.
RooAbsReal()
coverity[UNINIT_CTOR] Default constructor
RooFitResult is a container class to hold the input and output of a PDF fit to a dataset.
Abstract interface for evaluating a real-valued function of one real variable and performing numerica...
static Int_t numEvalErrorItems()
virtual void fillTreeBranch(TTree &t)
Fill the tree branch that associated with this object with its current value.
RooAbsReal * createIntegral(const RooArgSet &iset, const char *rangeName) const
Create integral over observables in iset in range named rangeName.
void setMessage(const char *tmp)
RooRealIntegral performs hybrid numerical/analytical integrals of RooAbsReal objects.
virtual Bool_t forceAnalyticalInt(const RooAbsArg &) const
RooAbsMoment * moment(RooRealVar &obs, Int_t order, Bool_t central, Bool_t takeRoot)
Return function representing moment of function of given order.
RooAbsReal * createIntObj(const RooArgSet &iset, const RooArgSet *nset, const RooNumIntConfig *cfg, const char *rangeName) const
Internal utility function for createIntegral() that creates the actual integral object.
static std::map< const RooAbsArg *, std::pair< std::string, std::list< EvalError > > > _evalErrorList
virtual RooPlot * plotAsymOn(RooPlot *frame, const RooAbsCategoryLValue &asymCat, PlotOpt o) const
const char * addToCurveName
virtual Bool_t isValid() const
Check if current value is valid.
The RooDataHist is a container class to hold N-dimensional binned data.
Lightweight interface adaptor that binds a RooAbsReal object to a subset of its servers and present i...
virtual Int_t minTrialSamples(const RooArgSet &) const
void selectComp(Bool_t flag)
~GlobalSelectComponentRAII()
virtual Bool_t readFromStream(std::istream &is, Bool_t compact, Bool_t verbose=kFALSE)
Read object contents from stream (dummy for now)
RooArgProxy is the abstract interface for RooAbsArg proxy classes.
Bool_t matchArgsByName(const RooArgSet &allArgs, RooArgSet &matchedArgs, const TList &nameList) const
Check if allArgs contains matching elements for each name in nameList.
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
virtual void setTreeBranchStatus(TTree &t, Bool_t active)
(De)Activate associated tree branch
TF1 * asTF(const RooArgList &obs, const RooArgList &pars=RooArgList(), const RooArgSet &nset=RooArgSet()) const
Return a ROOT TF1,2,3 object bound to this RooAbsReal with given definition of observables and parame...
static EvalErrorIter evalErrorIter()
static void setHideOffset(Bool_t flag)
TString integralNameSuffix(const RooArgSet &iset, const RooArgSet *nset=0, const char *rangeName=0, Bool_t omitEmpty=kFALSE) const
Construct string with unique suffix name to give to integral object that encodes integrated observabl...
const Text_t * getUnit() const
virtual Double_t analyticalIntegralWN(Int_t code, const RooArgSet *normSet, const char *rangeName=0) const
Implements the actual analytical integral(s) advertised by getAnalyticalIntegral.
virtual RooAbsReal * createChi2(RooDataHist &data, const RooLinkedList &cmdList)
Create a variable from a histogram and this function.
RooDerivative * derivative(RooRealVar &obs, Int_t order=1, Double_t eps=0.001)
Return function representing first, second or third order derivative of this function.
RooAbsFunc * bindVars(const RooArgSet &vars, const RooArgSet *nset=0, Bool_t clipInvalid=kFALSE) const
Create an interface adaptor f(vars) that binds us to the specified variables (in arbitrary order).
TString getTitle(Bool_t appendUnit=kFALSE) const
Return this variable's title string.
RooLinkedList is an collection class for internal use, storing a collection of RooAbsArg pointers in ...
EvalError(const EvalError &other)
virtual Double_t evaluate() const =0
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
RooDataHist * fillDataHist(RooDataHist *hist, const RooArgSet *nset, Double_t scaleFactor, Bool_t correctForBinVolume=kFALSE, Bool_t showProgress=kFALSE) const
Fill a RooDataHist with values sampled from this function at the bin centers.
RooFitResult * chi2FitDriver(RooAbsReal &fcn, RooLinkedList &cmdList)
Internal driver function for chi2 fits.
RooAbsReal * createIntRI(const RooArgSet &iset, const RooArgSet &nset=RooArgSet())
Utility function for createRunningIntegral.
virtual Int_t getMaxVal(const RooArgSet &vars) const
Advertise capability to determine maximum value of function for given set of observables.
void setParameterizeIntegral(const RooArgSet ¶mVars)
A RooPlot is a plot frame and a container for graphics objects within that frame.
void checkBatchComputation(const RooBatchCompute::RunContext &evalData, std::size_t evtNo, const RooArgSet *normSet=nullptr, double relAccuracy=1.E-13) const
Walk through expression tree headed by the this object, and check a batch computation.
RooAbsMoment * mean(RooRealVar &obs, const RooArgSet &nset)
virtual Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=0) const
Interface function getAnalyticalIntergral advertises the analytical integrals that are supported.
A RooCurve is a one-dimensional graphical representation of a real-valued function.
virtual RooFitResult * chi2FitTo(RooDataHist &data, const RooCmdArg &arg1=RooCmdArg::none(), const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none())
Perform a fit to given histogram.
virtual void enableOffsetting(Bool_t)
friend class RooAbsOptGoodnessOfFit
void plotOnCompSelect(RooArgSet *selNodes) const
Helper function for plotting of composite p.d.fs.
virtual void forceNumInt(Bool_t flag=kTRUE)
virtual Double_t offset() const
RooAbsReal * createRunningIntegral(const RooArgSet &iset, const RooArgSet &nset=RooArgSet())
Calls createRunningIntegral(const RooArgSet&, const RooCmdArg&, const RooCmdArg&, const RooCmdArg&,...
Double_t findRoot(RooRealVar &x, Double_t xmin, Double_t xmax, Double_t yval)
Return value of x (in range xmin,xmax) at which function equals yval.
void setIntegratorConfig()
Remove the specialized numeric integration configuration associated with this object.
RooAbsReal * createIntegral(const RooArgSet &iset, const RooArgSet &nset, const RooNumIntConfig &cfg, const char *rangeName=0) const
Create integral over observables in iset in range named rangeName with integrand normalized over obse...
virtual RooPlot * plotOn(RooPlot *frame, const RooCmdArg &arg1=RooCmdArg(), const RooCmdArg &arg2=RooCmdArg(), const RooCmdArg &arg3=RooCmdArg(), const RooCmdArg &arg4=RooCmdArg(), const RooCmdArg &arg5=RooCmdArg(), const RooCmdArg &arg6=RooCmdArg(), const RooCmdArg &arg7=RooCmdArg(), const RooCmdArg &arg8=RooCmdArg(), const RooCmdArg &arg9=RooCmdArg(), const RooCmdArg &arg10=RooCmdArg()) const
Plot (project) PDF on specified frame.
3-D histogram with a float per channel (see TH1 documentation)}
virtual RooAbsReal * createProfile(const RooArgSet ¶msOfInterest)
Create a RooProfileLL object that eliminates all nuisance parameters in the present function.
RooNumIntConfig * _specIntegratorConfig
virtual Double_t maxVal(Int_t code) const
Return maximum value for set of observables identified by code assigned in getMaxVal.
const char * normRangeName
void findInnerMostIntegration(const RooArgSet &allObs, RooArgSet &innerObs, const char *rangeName) const
Utility function for createIntObj() that aids in the construct of recursive integrals over functions ...
static void setCacheCheck(Bool_t flag)
Double_t traceEval(const RooArgSet *set) const
Calculate current value of object, with error tracing wrapper.
static RooNumIntConfig * defaultIntegratorConfig()
Returns the default numeric integration configuration for all RooAbsReals.
TH1 * createHistogram(const char *varNameList, Int_t xbins=0, Int_t ybins=0, Int_t zbins=0) const
Create and fill a ROOT histogram TH1, TH2 or TH3 with the values of this function for the variables w...
virtual Int_t getAnalyticalIntegralWN(RooArgSet &allVars, RooArgSet &analVars, const RooArgSet *normSet, const char *rangeName=0) const
Variant of getAnalyticalIntegral that is also passed the normalization set that should be applied to ...
Lightweight interface adaptor that exports a RooAbsPdf as a functor.
RooNumIntConfig * specialIntegratorConfig() const
Returns the specialized integrator configuration for this RooAbsReal.
void setUnit(const char *unit)
RooAbsReal & operator=(const RooAbsReal &other)
Assign values, name and configs from another RooAbsReal.
std::map< const RooAbsArg *, std::pair< std::string, std::list< EvalError > > >::const_iterator EvalErrorIter
adaptor that projects a real function via summation of states provided in a dataset.
static Int_t _evalErrorCount
RooGenFunction * iGenFunction(RooRealVar &x, const RooArgSet &nset=RooArgSet())
Bool_t postRangeFracScale
RooCategory is an object to represent discrete states.
1-D histogram with a float per channel (see TH1 documentation)}
RooAddModel is an efficient implementation of a sum of PDFs of the form.
RooVectorDataStore uses std::vectors to store data columns.
virtual Bool_t isIdentical(const RooAbsArg &other, Bool_t assumeSameType=kFALSE) const
RooAbsReal * createScanRI(const RooArgSet &iset, const RooArgSet &nset, Int_t numScanBins, Int_t intOrder)
Utility function for createRunningIntegral that construct an object implementing the numeric scanning...
#define ClassDef(name, id)
const RooFitResult * errorFR
Bool_t getForceNumInt() const
TH1 is the base class of all histogramm classes in ROOT.
RooAbsArg * createFundamental(const char *newname=0) const
Create a RooRealVar fundamental object with our properties.
virtual RooPlot * plotSliceOn(RooPlot *frame, const RooArgSet &sliceSet, Option_t *drawOptions="L", Double_t scaleFactor=1.0, ScaleType stype=Relative, const RooAbsData *projData=0) const
const RooAbsReal * createPlotProjection(const RooArgSet &depVars, const RooArgSet &projVars) const
Utility function for plotOn() that creates a projection of a function or p.d.f to be plotted on a Roo...
static Bool_t hideOffset()
virtual void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Structure printing.
RooDataSet is a container class to hold unbinned data.
virtual void preferredObservableScanOrder(const RooArgSet &obs, RooArgSet &orderedObs) const
Interface method for function objects to indicate their preferred order of observables for scanning t...
RooAbsArg is the common abstract base class for objects that represent a value and a "shape" in RooFi...
virtual RooSpan< const double > getValues(RooBatchCompute::RunContext &evalData, const RooArgSet *normSet=nullptr) const
by this change, please consult the release notes for ROOT 6.24 for guidance on how to make this trans...
RooNumIntConfig holds the configuration parameters of the various numeric integrators used by RooReal...
Double_t _DEBUG_getVal(const RooArgSet *normalisationSet) const
Debug version of getVal(), which is slow and does error checking.
Bool_t matchArgs(const RooArgSet &allDeps, RooArgSet &numDeps, const RooArgProxy &a) const
Utility function for use in getAnalyticalIntegral().
static void globalSelectComp(Bool_t flag)
Global switch controlling the activation of the selectComp() functionality.
RooFit::MPSplit interleave
virtual void fixAddCoefRange(const char *rangeName=0, Bool_t force=kTRUE)
Fix the interpretation of the coefficient of any RooAddPdf component in the expression tree headed by...
RooAbsMoment * sigma(RooRealVar &obs, const RooArgSet &nset)
static Int_t numEvalErrors()
Return the number of logged evaluation errors since the last clearing.
RooAbsCategoryLValue is the common abstract base class for objects that represent a discrete value th...
RooRealVar represents a variable that can be changed from the outside.
RooAbsRealLValue is the common abstract base class for objects that represent a real value that may a...
Helper class to access a batch-related part of RooAbsReal's interface, which should not leak to the o...
The class RooRealSumPdf implements a PDF constructed from a sum of functions:
const RooArgSet * projSet
Data that has to be passed around when evaluating functions / PDFs.
TH1 * fillHistogram(TH1 *hist, const RooArgList &plotVars, Double_t scaleFactor=1, const RooArgSet *projectedVars=0, Bool_t scaling=kTRUE, const RooArgSet *condObs=0, Bool_t setError=kTRUE) const
Fill the ROOT histogram 'hist' with values sampled from this function at the bin centers.
static Bool_t _hideOffset
RooAbsAnaConvPdf is the base class for PDFs that represent a physics model that can be analytically c...
A simple container to hold a batch of data values.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
const double xbins[xbins_n]
virtual void attachToVStore(RooVectorDataStore &vstore)
RooCmdArg Extended(Bool_t flag=kTRUE)