68 _pdfObsList(
"pdfObs",
"List of p.d.f. observables",this),
83 <<
") ERROR variable list and RooDataHist must contain the same variables." << endl ;
91 <<
") ERROR variable list and RooDataHist must contain the same variables." << endl ;
104 while ((hobs = oiter.
next())) {
128 _pdfObsList(
"pdfObs",
"List of p.d.f. observables",this),
143 <<
") ERROR histogram variable list and RooDataHist must contain the same variables." << endl ;
144 throw(
string(
"RooHistPdf::ctor() ERROR: histogram variable list and RooDataHist must contain the same variables")) ;
151 <<
") ERROR variable list and RooDataHist must contain the same variables." << endl ;
152 throw(
string(
"RooHistPdf::ctor() ERROR: histogram variable list and RooDataHist must contain the same variables")) ;
156 <<
") ERROR all elements of histogram observables set must be of type RooRealVar or RooCategory." << endl ;
157 throw(
string(
"RooHistPdf::ctor() ERROR all elements of histogram observables set must be of type RooRealVar or RooCategory.")) ;
168 while ((hobs = oiter.
next())) {
280 if (!_x || !_y)
return false;
281 if (!range || !strlen(range) || !_x->
hasRange(range) ||
308 Int_t code = 0, frcode = 0,
n = 0;
310 if (allVars.
find(*pa)) {
313 if (fullRange(*pa, *ha, rangeName)) {
319 if (code == frcode) {
331 return (code >= 2) ? code : 0;
351 std::map<const RooAbsArg*, std::pair<Double_t, Double_t> > ranges;
356 if (code & (2 << n)) {
363 if (rangeName && rlv->
hasRange(rangeName)) {
364 ranges[ha] = std::make_pair(
366 }
else if (binning) {
368 ranges[ha] = std::make_pair(
371 ranges[ha] = std::make_pair(
381 ha->copyCache(pa,
kTRUE);
435 list<Double_t>* hint =
new list<Double_t> ;
438 xlo = xlo - 0.01*(xhi-xlo) ;
439 xhi = xhi + 0.01*(xhi-xlo) ;
446 if (boundaries[i]>=xlo && boundaries[i]<=xhi) {
447 hint->push_back(boundaries[i]-delta) ;
448 hint->push_back(boundaries[i]+delta) ;
479 list<Double_t>* hint =
new list<Double_t> ;
484 if (boundaries[i]>=xlo && boundaries[i]<=xhi) {
485 hint->push_back(boundaries[i]) ;
520 if (wgt>max) max=wgt ;
550 std::list<RooAbsData*> allData = ws.
allData() ;
551 std::list<RooAbsData*>::const_iterator iter ;
552 for (iter = allData.begin() ; iter != allData.end() ; ++iter) {
578 coutE(
ObjectHandling) <<
" RooHistPdf::importWorkspaceHook(" <<
GetName() <<
") unable to import clone of underlying RooDataHist with unique name " << uniqueName <<
", abort" << endl ;
590 coutE(
ObjectHandling) <<
" RooHistPdf::importWorkspaceHook(" <<
GetName() <<
") unable to import clone of underlying RooDataHist with unique name " << uniqueName <<
", abort" << endl ;
611 void RooHistPdf::Streamer(
TBuffer &R__b)
virtual Double_t getMin(const char *name=0) const
virtual const char * GetName() const
Returns name of object.
TIterator * createIterator(Bool_t dir=kIterForward) const
virtual std::list< Double_t > * plotSamplingHint(RooAbsRealLValue &obs, Double_t xlo, Double_t xhi) const
Return sampling hint for making curves of (projections) of this function as the recursive division st...
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
virtual Double_t getMax(const char *name=0) const
virtual Bool_t add(const RooAbsCollection &col, Bool_t silent=kFALSE)
Add a collection of arguments to this collection by calling add() for each element in the source coll...
Double_t evaluate() const
Return the current value: The value of the bin enclosing the current coordinates of the observables...
virtual const RooArgSet * get() const
RooAbsCollection * selectCommon(const RooAbsCollection &refColl) const
Create a subset of the current collection, consisting only of those elements that are contained as we...
virtual Bool_t isParameterized() const
Double_t getVal(const RooArgSet *set=0) const
Buffer base class used for serializing objects.
RooAbsData * embeddedData(const char *name) const
Retrieve dataset (binned or unbinned) with given name. A null pointer is returned if not found...
virtual ~RooHistPdf()
Destructor.
Iterator abstract base class.
virtual Int_t numBoundaries() const =0
virtual Bool_t inRange(const char *) const
virtual void syncCache(const RooArgSet *nset=0)=0
RooDataSet is a container class to hold N-dimensional binned data.
Int_t numTypes(const char *=0) const
virtual void removeAll()
Remove all arguments from our set, deleting them if we own them.
virtual const RooAbsBinning * getBinningPtr(const char *rangeName) const =0
virtual Double_t weight() const
virtual RooAbsReal * highBoundFunc() const
virtual RooAbsReal * lowBoundFunc() const
virtual Double_t highBound() const =0
std::list< RooAbsData * > allData() const
Return list of all dataset in the workspace.
RooRealVar represents a fundamental (non-derived) real valued object.
virtual void addClone(const RooAbsCollection &col, Bool_t silent=kFALSE)
Add a collection of arguments to this collection by calling addOwned() for each element in the source...
virtual Bool_t isFundamental() const
RooHistPdf implements a probablity density function sampled from a multidimensional histogram...
RooHistPdf()
Default constructor coverity[UNINIT_CTOR].
virtual const RooAbsBinning * getBinningPtr(const char *rangeName) const
VecExpr< UnaryOp< Fabs< T >, VecExpr< A, T, D >, T >, T, D > fabs(const VecExpr< A, T, D > &rhs)
Double_t totVolume() const
Return the total volume spanned by the observables of the RooHistPdf.
virtual void copyCache(const RooAbsArg *source, Bool_t valueOnly=kFALSE, Bool_t setValDirty=kTRUE)=0
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
Bool_t _unitNorm
Total volume of space (product of ranges of observables)
Double_t analyticalIntegral(Int_t code, const char *rangeName=0) const
Return integral identified by 'code'.
char * Form(const char *fmt,...)
virtual std::list< Double_t > * binBoundaries(RooAbsRealLValue &, Double_t, Double_t) const
Return sampling hint for making curves of (projections) of this function as the recursive division st...
virtual Double_t lowBound() const =0
RooAbsData is the common abstract base class for binned and unbinned datasets.
RooCmdArg Rename(const char *suffix)
Bool_t areIdentical(const RooDataHist &dh1, const RooDataHist &dh2)
RooCategory represents a fundamental (non-derived) discrete value object.
Double_t sum(Bool_t correctForBinSize, Bool_t inverseCorr=kFALSE) const
Return the sum of the weights of all hist bins.
Int_t _intOrder
Auxiliary class keeping tracking of analytical integration code.
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
RooAbsBinning is the abstract base class for RooRealVar binning definitions This class defines the in...
virtual Double_t sumEntries() const
RooAbsArg * find(const char *name) const
Find object with given name in list.
virtual Int_t numEntries() const
Return the number of bins.
RooFIter fwdIterator() const
virtual Int_t getMaxVal(const RooArgSet &vars) const
Only handle case of maximum in all variables.
RooCmdArg Embedded(Bool_t flag=kTRUE)
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
void setRange(const char *name, Double_t min, Double_t max)
Set range named 'name to [min,max].
Bool_t importWorkspaceHook(RooWorkspace &ws)
Check if our datahist is already in the workspace.
RooAbsCollection is an abstract container object that can hold multiple RooAbsArg objects...
RooAbsRealLValue is the common abstract base class for objects that represent a real value that may a...
RooAbsPdf is the abstract interface for all probability density functions The class provides hybrid a...
Bool_t import(const RooAbsArg &arg, 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())
Import a RooAbsArg object, e.g.
virtual Bool_t hasRange(const char *name) const
virtual TObject * Next()=0
virtual Double_t * array() const =0
Abstract base class for objects that are lvalues, i.e.
virtual Double_t maxVal(Int_t code) const
Return maximum value for set of observables identified by code assigned in getMaxVal.
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=0) const
Determine integration scenario.
The RooWorkspace is a persistable container for RooFit projects.
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Overloaded RooArgSet::add() method inserts 'var' into set and registers 'var' as server to owner with...