72 _depList(
"depList",
"List of dependents",this),
86 coutE(InputArguments) <<
"RooHistFunc::ctor(" <<
GetName()
87 <<
") ERROR variable list and RooDataHist must contain the same variables." << endl ;
91 for (
const auto arg : vars) {
92 if (!dvars->
find(arg->GetName())) {
93 coutE(InputArguments) <<
"RooHistFunc::ctor(" <<
GetName()
94 <<
") ERROR variable list and RooDataHist must contain the same variables." << endl ;
114 _depList(
"depList",
"List of dependents",this),
128 coutE(InputArguments) <<
"RooHistFunc::ctor(" <<
GetName()
129 <<
") ERROR variable list and RooDataHist must contain the same variables." << endl ;
133 for (
const auto arg : histObs) {
134 if (!dvars->
find(arg->GetName())) {
135 coutE(InputArguments) <<
"RooHistFunc::ctor(" <<
GetName()
136 <<
") ERROR variable list and RooDataHist must contain the same variables." << endl ;
151 _depList(
"depList",this,other._depList),
152 _dataHist(other._dataHist),
153 _codeReg(other._codeReg),
154 _intOrder(other._intOrder),
155 _cdfBoundaries(other._cdfBoundaries),
156 _totVolume(other._totVolume),
157 _unitNorm(other._unitNorm)
191 harg->copyCache(parg,
kTRUE) ;
192 if (!harg->inRange(0)) {
227 if (wgt>max) max=wgt ;
301 if (
string(parg->GetName())==obs.
GetName()) {
319 list<Double_t>* hint =
new list<Double_t> ;
322 xlo = xlo - 0.01*(xhi-xlo) ;
323 xhi = xhi + 0.01*(xhi-xlo) ;
330 if (boundaries[i]>=xlo && boundaries[i]<=xhi) {
331 hint->push_back(boundaries[i]-delta) ;
332 hint->push_back(boundaries[i]+delta) ;
357 if (
string(parg->GetName())==obs.
GetName()) {
373 if (
string(harg->GetName())==obs.
GetName()) {
381 cout <<
"RooHistFunc::binBoundaries(" <<
GetName() <<
") obs = " << obs.
GetName() <<
" hobs is not found, returning null" << endl ;
397 cout <<
"RooHistFunc::binBoundaries(" <<
GetName() <<
") hobs = " << hobs->
GetName() <<
" is not found in dataset?" << endl ;
403 cout <<
"RooHistFunc::binBoundaries(" <<
GetName() <<
") hobs = " << hobs->
GetName() <<
" but is not an LV, returning null" << endl ;
411 list<Double_t>* hint =
new list<Double_t> ;
418 if (boundaries[i]>xlo-delta && boundaries[i]<xhi+delta) {
422 transform->
setVal(boundary) ;
424 hint->push_back(obs.
getVal()) ;
426 hint->push_back(boundary) ;
463 coutE(ObjectHandling) <<
" RooHistPdf::importWorkspaceHook(" <<
GetName() <<
") unable to import clone of underlying RooDataHist with unique name " << uniqueName <<
", abort" << endl ;
475 coutE(ObjectHandling) <<
" RooHistPdf::importWorkspaceHook(" <<
GetName() <<
") unable to import clone of underlying RooDataHist with unique name " << uniqueName <<
", abort" << endl ;
char * Form(const char *fmt,...)
RooAbsArg is the common abstract base class for objects that represent a value and a "shape" in RooFi...
Bool_t dependsOn(const RooAbsCollection &serverList, const RooAbsArg *ignoreArg=0, Bool_t valueOnly=kFALSE) const
Test whether we depend on (ie, are served by) any object in the specified collection.
void registerProxy(RooArgProxy &proxy)
Register an RooArgProxy in the proxy list.
friend void RooRefArray::Streamer(TBuffer &)
RooAbsBinning is the abstract base class for RooRealVar binning definitions.
virtual Double_t * array() const =0
virtual Int_t numBoundaries() const =0
Int_t numTypes(const char *=0) const
Return number of types defined (in range named rangeName if rangeName!=0)
RooAbsCollection is an abstract container object that can hold multiple RooAbsArg objects.
RooAbsCollection * selectCommon(const RooAbsCollection &refColl) const
Create a subset of the current collection, consisting only of those elements that are contained as we...
Storage_t::size_type size() const
virtual void Print(Option_t *options=0) const
This method must be overridden when a class wants to print itself.
RooAbsArg * find(const char *name) const
Find object with given name in list.
RooAbsData is the common abstract base class for binned and unbinned datasets.
Abstract base class for objects that are lvalues, i.e.
virtual const RooAbsBinning * getBinningPtr(const char *rangeName) const =0
RooAbsRealLValue is the common abstract base class for objects that represent a real value that may a...
virtual Double_t getMax(const char *name=0) const
Get maximum of currently defined range.
virtual void setVal(Double_t value)=0
Set the current value of the object. Needs to be overridden by implementations.
virtual Double_t getMin(const char *name=0) const
Get miniminum of currently defined range.
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Double_t getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
RooAbsArg * addClone(const RooAbsArg &var, Bool_t silent=kFALSE) override
Add clone of specified element to an owning set.
RooCategory is an object to represent discrete states.
The RooDataHist is a container class to hold N-dimensional binned data.
double weight(std::size_t i) const
Return weight of i-th bin.
Double_t sumEntries() const override
Sum the weights of all bins.
Int_t numEntries() const override
Return the number of bins.
const RooArgSet * get() const override
Get bin centre of current bin.
RooHistFunc implements a real-valued function sampled from a multidimensional histogram.
virtual Int_t getMaxVal(const RooArgSet &vars) const
Only handle case of maximum in all variables.
Double_t evaluate() const
Return the current value: The value of the bin enclosing the current coordinates of the dependents,...
Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=0) const
Determine integration scenario.
Bool_t importWorkspaceHook(RooWorkspace &ws)
Check if our datahist is already in the workspace.
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...
RooHistFunc()
Default constructor.
Double_t totVolume() const
Return the total volume spanned by the observables of the RooDataHist.
Double_t analyticalIntegral(Int_t code, const char *rangeName=0) const
Return integral identified by 'code'.
virtual void ioStreamerPass2()
Schema evolution: if histObsList wasn't filled from persistence (v1) then fill it here.
Bool_t areIdentical(const RooDataHist &dh1, const RooDataHist &dh2)
virtual Double_t maxVal(Int_t code) const
Return maximum value for set of observables identified by code assigned in getMaxVal.
Int_t _intOrder
Auxiliary class keeping tracking of analytical integration code.
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...
static Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName, RooArgSet const &histObsList, RooSetProxy const &pdfObsList, Int_t intOrder)
static Double_t analyticalIntegral(Int_t code, const char *rangeName, RooArgSet const &histObsList, RooSetProxy const &pdfObsList, RooDataHist &dataHist, bool histFuncMode)
RooNameSet is a utility class that stores the names the objects in a RooArget.
RooRealVar represents a variable that can be changed from the outside.
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE) override
Overloaded RooArgSet::add() method inserts 'var' into set and registers 'var' as server to owner with...
The RooWorkspace is a persistable container for RooFit projects.
Buffer base class used for serializing objects.
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
virtual const char * GetName() const
Returns name of object.
virtual void Clear(Option_t *option="")
Remove all objects from the array.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
const char * Data() const
RooCmdArg Embedded(Bool_t flag=kTRUE)
RooCmdArg Rename(const char *suffix)