67 _pdfObsList(
"pdfObs",
"List of p.d.f. observables",this),
82 <<
") ERROR variable list and RooDataHist must contain the same variables." << endl ;
90 <<
") ERROR variable list and RooDataHist must contain the same variables." << endl ;
103 while ((hobs = oiter.
next())) {
127 _pdfObsList(
"pdfObs",
"List of p.d.f. observables",this),
142 <<
") ERROR histogram variable list and RooDataHist must contain the same variables." << endl ;
143 throw(
string(
"RooHistPdf::ctor() ERROR: histogram variable list and RooDataHist must contain the same variables")) ;
150 <<
") ERROR variable list and RooDataHist must contain the same variables." << endl ;
151 throw(
string(
"RooHistPdf::ctor() ERROR: histogram variable list and RooDataHist must contain the same variables")) ;
155 <<
") ERROR all elements of histogram observables set must be of type RooRealVar or RooCategory." << endl ;
156 throw(
string(
"RooHistPdf::ctor() ERROR all elements of histogram observables set must be of type RooRealVar or RooCategory.")) ;
167 while ((hobs = oiter.
next())) {
184 _pdfObsList(
"pdfObs",this,other._pdfObsList),
185 _dataHist(other._dataHist),
186 _codeReg(other._codeReg),
187 _intOrder(other._intOrder),
188 _cdfBoundaries(other._cdfBoundaries),
189 _totVolume(other._totVolume),
190 _unitNorm(other._unitNorm)
279 if (!_x || !_y)
return false;
280 if (!range || !strlen(range) || !_x->
hasRange(range) ||
307 Int_t code = 0, frcode = 0,
n = 0;
309 if (allVars.
find(*pa)) {
312 if (fullRange(*pa, *ha, rangeName)) {
318 if (code == frcode) {
330 return (code >= 2) ? code : 0;
350 std::map<const RooAbsArg*, std::pair<Double_t, Double_t> > ranges;
355 if (code & (2 << n)) {
362 if (rangeName && rlv->
hasRange(rangeName)) {
363 ranges[ha] = std::make_pair(
365 }
else if (binning) {
367 ranges[ha] = std::make_pair(
370 ranges[ha] = std::make_pair(
380 ha->copyCache(pa,
kTRUE);
434 list<Double_t>* hint =
new list<Double_t> ;
437 xlo = xlo - 0.01*(xhi-xlo) ;
438 xhi = xhi + 0.01*(xhi-xlo) ;
445 if (boundaries[i]>=xlo && boundaries[i]<=xhi) {
446 hint->push_back(boundaries[i]-delta) ;
447 hint->push_back(boundaries[i]+delta) ;
478 list<Double_t>* hint =
new list<Double_t> ;
483 if (boundaries[i]>=xlo && boundaries[i]<=xhi) {
484 hint->push_back(boundaries[i]) ;
519 if (wgt>max) max=wgt ;
549 std::list<RooAbsData*> allData = ws.
allData() ;
550 std::list<RooAbsData*>::const_iterator
iter ;
551 for (iter = allData.begin() ; iter != allData.end() ; ++
iter) {
577 coutE(
ObjectHandling) <<
" RooHistPdf::importWorkspaceHook(" <<
GetName() <<
") unable to import clone of underlying RooDataHist with unique name " << uniqueName <<
", abort" << endl ;
589 coutE(
ObjectHandling) <<
" RooHistPdf::importWorkspaceHook(" <<
GetName() <<
") unable to import clone of underlying RooDataHist with unique name " << uniqueName <<
", abort" << endl ;
610 void RooHistPdf::Streamer(
TBuffer &R__b)
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
virtual RooAbsReal * lowBoundFunc() const
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
RooAbsCollection * selectCommon(const RooAbsCollection &refColl) const
Create a subset of the current collection, consisting only of those elements that are contained as we...
virtual const RooAbsBinning * getBinningPtr(const char *rangeName) const
RooFIter fwdIterator() const
virtual RooAbsReal * highBoundFunc() const
virtual Bool_t isFundamental() const
std::list< RooAbsData * > allData() const
Return list of all dataset in the workspace.
Buffer base class used for serializing objects.
virtual Double_t getMin(const char *name=0) const
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 const RooArgSet * get() const
virtual void syncCache(const RooArgSet *nset=0)=0
const char * Data() const
Double_t evaluate() const
Return the current value: The value of the bin enclosing the current coordinates of the observables...
virtual Double_t maxVal(Int_t code) const
Return maximum value for set of observables identified by code assigned in getMaxVal.
virtual void removeAll()
Remove all arguments from our set, deleting them if we own them.
Int_t numTypes(const char *=0) const
virtual const RooAbsBinning * getBinningPtr(const char *rangeName) const =0
Double_t totVolume() const
Return the total volume spanned by the observables of the RooHistPdf.
std::map< std::string, std::string >::const_iterator iter
TIterator * createIterator(Bool_t dir=kIterForward) const
Double_t getVal(const RooArgSet *set=0) const
virtual Double_t highBound() const =0
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...
Double_t sum(Bool_t correctForBinSize, Bool_t inverseCorr=kFALSE) const
Return the sum of the weights of all hist bins.
RooHistPdf()
Default constructor coverity[UNINIT_CTOR].
virtual Bool_t hasRange(const char *name) const
VecExpr< UnaryOp< Fabs< T >, VecExpr< A, T, D >, T >, T, D > fabs(const VecExpr< A, T, D > &rhs)
RooAbsArg * find(const char *name) const
Find object with given name in list.
virtual Double_t weight() const
virtual void copyCache(const RooAbsArg *source, Bool_t valueOnly=kFALSE, Bool_t setValDirty=kTRUE)=0
Bool_t _unitNorm
Total volume of space (product of ranges of observables)
char * Form(const char *fmt,...)
virtual const char * GetName() const
Returns name of object.
virtual Bool_t inRange(const char *) const
Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=0) const
Determine integration scenario.
virtual Double_t lowBound() const =0
RooCmdArg Rename(const char *suffix)
Double_t analyticalIntegral(Int_t code, const char *rangeName=0) const
Return integral identified by 'code'.
Bool_t areIdentical(const RooDataHist &dh1, const RooDataHist &dh2)
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
virtual Bool_t isParameterized() const
RooCmdArg Embedded(Bool_t flag=kTRUE)
virtual Int_t numEntries() const
Return the number of bins.
virtual Int_t getMaxVal(const RooArgSet &vars) const
Only handle case of maximum in all variables.
static Vc_ALWAYS_INLINE int_v max(const int_v &x, const int_v &y)
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.
virtual Double_t getMax(const char *name=0) 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...
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 TObject * Next()=0
virtual RooAbsArg * addClone(const RooAbsArg &var, Bool_t silent=kFALSE)
Add clone of specified element to an owning set.
virtual Double_t * array() const =0
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add element to non-owning set.
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...
virtual Double_t sumEntries() const