94 _refCoefNorm(
"!refCoefNorm",
"Reference coefficient normalization set",this,false,false),
95 _projCacheMgr(this,10),
96 _pdfList(
"!pdfs",
"List of PDFs",this),
97 _coefList(
"!coefficients",
"List of coefficients",this),
98 _coefErrCount{_errorCount}
108 using PdfInfo = std::pair<std::string,RooAbsArg*>;
109 std::set<PdfInfo> seen;
111 PdfInfo elem{pdf->
GetName(), pdf};
112 auto comp = [&](PdfInfo
const& p){
return p.first == elem.first && p.second != elem.second; };
113 auto found = std::find_if(seen.begin(), seen.end(), comp);
114 if(found != seen.end()) {
115 std::stringstream errorMsg;
116 errorMsg <<
"RooAddPdf::RooAddPdf(" <<
GetName()
117 <<
") pdf list contains pdfs with duplicate name \"" << pdf->GetName() <<
"\"."
119 coutE(InputArguments) << errorMsg.str();
120 throw std::invalid_argument(errorMsg.str().c_str());
160 if (inPdfList.
size()>inCoefList.
size()+1 || inPdfList.
size()<inCoefList.
size()) {
161 std::stringstream errorMsg;
162 errorMsg <<
"RooAddPdf::RooAddPdf(" <<
GetName()
163 <<
") number of pdfs and coefficients inconsistent, must have Npdf=Ncoef or Npdf=Ncoef+1." << endl ;
164 coutE(InputArguments) << errorMsg.str();
165 throw std::invalid_argument(errorMsg.str().c_str());
168 if (recursiveFractions && inPdfList.
size()!=inCoefList.
size()+1) {
169 std::stringstream errorMsg;
170 errorMsg <<
"RooAddPdf::RooAddPdf(" <<
GetName()
171 <<
"): Recursive fractions option can only be used if Npdf=Ncoef+1." << endl;
172 coutE(InputArguments) << errorMsg.str();
173 throw std::invalid_argument(errorMsg.str());
181 for (
auto i = 0u; i < inCoefList.
size(); ++i) {
182 auto coef =
dynamic_cast<RooAbsReal*
>(inCoefList.
at(i));
183 auto pdf =
dynamic_cast<RooAbsPdf*
>(inPdfList.
at(i));
184 if (inPdfList.
at(i) ==
nullptr) {
185 std::stringstream errorMsg;
186 errorMsg <<
"RooAddPdf::RooAddPdf(" <<
GetName()
187 <<
") number of pdfs and coefficients inconsistent, must have Npdf=Ncoef or Npdf=Ncoef+1" << endl ;
188 coutE(InputArguments) << errorMsg.str();
189 throw std::invalid_argument(errorMsg.str());
192 std::stringstream errorMsg;
193 errorMsg <<
"RooAddPdf::RooAddPdf(" <<
GetName() <<
") coefficient " << (coef ? coef->GetName() :
"") <<
" is not of type RooAbsReal, ignored" << endl ;
194 coutE(InputArguments) << errorMsg.str();
195 throw std::invalid_argument(errorMsg.str());
198 std::stringstream errorMsg;
199 errorMsg <<
"RooAddPdf::RooAddPdf(" <<
GetName() <<
") pdf " << (pdf ? pdf->GetName() :
"") <<
" is not of type RooAbsPdf, ignored" << endl ;
200 coutE(InputArguments) << errorMsg.str();
201 throw std::invalid_argument(errorMsg.str());
206 if (recursiveFractions) {
207 partinCoefList.
add(*coef) ;
228 if (inPdfList.
size() == inCoefList.
size() + 1) {
232 coutE(InputArguments) <<
"RooAddPdf::RooAddPdf(" <<
GetName() <<
") last argument " << inPdfList.
at(inCoefList.
size())->
GetName() <<
" is not of type RooAbsPdf." << endl ;
233 throw std::invalid_argument(
"Last argument for RooAddPdf is not a PDF.");
238 if (recursiveFractions) {
270 for (
const auto pdfArg : inPdfList) {
271 auto pdf =
dynamic_cast<const RooAbsPdf*
>(pdfArg);
274 coutE(InputArguments) <<
"RooAddPdf::RooAddPdf(" <<
GetName() <<
") pdf " << (pdf ? pdf->GetName() :
"") <<
" is not of type RooAbsPdf, ignored" << endl ;
277 if (!pdf->canBeExtended()) {
278 coutE(InputArguments) <<
"RooAddPdf::RooAddPdf(" <<
GetName() <<
") pdf " << pdf->
GetName() <<
" is not extendable, ignored" << endl ;
293 _refCoefNorm(
"!refCoefNorm",this,other._refCoefNorm),
294 _refCoefRangeName((
TNamed*)other._refCoefRangeName),
295 _projectCoefs(other._projectCoefs),
296 _projCacheMgr(other._projCacheMgr,this),
297 _codeReg(other._codeReg),
298 _pdfList(
"!pdfs",this,other._pdfList),
299 _coefList(
"!coefficients",this,other._coefList),
300 _haveLastCoef(other._haveLastCoef),
301 _allExtendable(other._allExtendable),
302 _recursive(other._recursive)
322 if (refCoefNorm.
empty()) {
381 auto fullDepList = std::unique_ptr<RooArgSet>{
getObservables(nset)} ;
383 fullDepList->
remove(*iset,
true,
true) ;
395 if (
auto pdfDeps = std::unique_ptr<RooArgSet>{pdf->getObservables(nset)}) {
396 supNSet.
remove(*pdfDeps,
true,
true) ;
400 if (
auto coefDeps = std::unique_ptr<RooArgSet>{coef ? coef->getObservables(nset) :
nullptr}) {
401 supNSet.
remove(*coefDeps,
true,
true) ;
407 if (!supNSet.
empty()) {
409 cxcoutD(Caching) <<
"RooAddPdf " <<
GetName() <<
" making supplemental normalization set " << supNSet <<
" for pdf component " << pdf->
GetName() << endl ;
412 snorm =
new RooRealVar(
name.c_str(),
"Unit Supplemental normalization integral",1.0) ;
418 cxcoutD(Caching) <<
"RooAddPdf::syncSuppNormList(" <<
GetName() <<
") synching supplemental normalization list for norm" << (nset?*nset:
RooArgSet()) << endl ;
443 cxcoutD(Caching) <<
"RooAddPdf(" <<
GetName() <<
")::getPC nset = " << (nset?*nset:
RooArgSet()) <<
" nset2 = " << *nset2 << endl ;
458 cxcoutD(Caching) <<
"ALEX: RooAddPdf::syncCoefProjList(" <<
GetName() <<
") projecting coefficients from "
459 << *nset2 << (rangeName?
":":
"") << (rangeName?rangeName:
"")
464 auto thePdf =
static_cast<const RooAbsPdf*
>(arg);
471 cxcoutD(Caching) <<
"RooAddPdf(" <<
GetName() <<
")::getPC nset2(" << *nset2 <<
")!=_refCoefNorm(" <<
_refCoefNorm <<
") --> pdfProj = " << pdfProj->
GetName() << endl ;
473 auto name = std::string(
GetName()) +
"_" + thePdf->GetName() +
"_ProjectNorm";
474 pdfProj =
new RooRealVar(
name.c_str(),
"Unit Projection normalization integral",1.0) ;
475 cxcoutD(Caching) <<
"RooAddPdf(" <<
GetName() <<
")::getPC nset2(" << *nset2 <<
")==_refCoefNorm("
480 cxcoutD(Caching) <<
" RooAddPdf::syncCoefProjList(" <<
GetName() <<
") PP = " << pdfProj->
GetName() << endl ;
484 auto deps = std::unique_ptr<RooArgSet>{thePdf->getParameters(
RooArgSet())} ;
485 supNormSet.
remove(*deps,
true,
true) ;
493 snorm =
new RooRealVar(
name.c_str(),
"Unit Projection Supplemental normalization integral",1.0) ;
495 cxcoutD(Caching) <<
" RooAddPdf::syncCoefProjList(" <<
GetName() <<
") SN = " << snorm->
GetName() << endl ;
511 bool allIdent = true ;
512 for (
auto const& obsArg : *tmpObs) {
526 auto tmp = std::unique_ptr<RooArgSet>{thePdf->getObservables(
_refCoefNorm)} ;
533 auto theName = std::string(
GetName()) +
"_" + thePdf->
GetName() +
"_RangeNorm1";
534 rangeProj1 =
new RooRealVar(theName.c_str(),
"Unit range normalization integral",1.0) ;
537 cxcoutD(Caching) <<
" RooAddPdf::syncCoefProjList(" <<
GetName() <<
") R1 = " << rangeProj1->
GetName() << endl ;
543 cxcoutD(Caching) <<
"RooAddPdf::syncCoefProjList(" <<
GetName() <<
") rangename = " << (rangeName?rangeName:
"<null>")
544 <<
" nset = " << (nset?*nset:
RooArgSet()) << endl ;
557 auto theName = std::string(
GetName()) +
"_" + thePdf->
GetName() +
"_RangeNorm2";
558 rangeProj2 =
new RooRealVar(theName.c_str(),
"Unit range normalization integral",1.0) ;
561 cxcoutD(Caching) <<
" RooAddPdf::syncCoefProjList(" <<
GetName() <<
") R2 = " << rangeProj2->
GetName() << endl ;
583 auto& myCoefCache =
const_cast<std::vector<double>&
>(
_coefCache);
595 coefSum += myCoefCache[i] ;
600 coutW(Eval) <<
"RooAddPdf::updateCoefCache(" <<
GetName() <<
") WARNING: total number of expected events is 0" << endl ;
603 myCoefCache[j] /= coefSum ;
614 auto coef =
static_cast<RooAbsReal*
>(coefArg);
615 myCoefCache[i] = coef->
getVal(nset) ;
616 coefSum += myCoefCache[i++];
619 coutW(Eval) <<
"RooAddPdf::updateCoefCache(" <<
GetName() <<
") WARNING: sum of coefficients is zero 0" << endl ;
621 const double invCoefSum = 1./coefSum;
623 myCoefCache[j] *= invCoefSum;
632 auto coef =
static_cast<RooAbsReal*
>(coefArg);
633 myCoefCache[i] = coef->
getVal(nset) ;
634 lastCoef -= myCoefCache[i++];
639 const float coefDegen = lastCoef < 0. ? -lastCoef : (lastCoef > 1. ? lastCoef - 1. : 0.);
640 if (coefDegen > 1.E-5) {
643 std::stringstream msg;
645 msg <<
"RooAddPdf::updateCoefCache(" <<
GetName()
646 <<
" WARNING: sum of PDF coefficients not in range [0-1], value="
649 msg <<
" (no more will be printed)" ;
651 coutW(Eval) << msg.str() << std::endl;
677 myCoefCache[i] *= proj ;
678 coefSum += myCoefCache[i] ;
685 ccoutD(Caching) <<
" ALEX: POST-SYNC coef[" << i <<
"] = " << myCoefCache[i]
686 <<
" ( _coefCache[i]/coefSum = " << myCoefCache[i]*coefSum <<
"/" << coefSum <<
" ) "<< endl ;
691 coutE(Eval) <<
"RooAddPdf::updateCoefCache(" <<
GetName() <<
") sum of coefficients is zero." << endl ;
695 myCoefCache[i] /= coefSum ;
707 if(nset && nset->
empty()) nset =
nullptr;
709 if (nset ==
nullptr) {
731 if(nset ==
nullptr) {
739 if (nset ==
nullptr) {
740 oocoutW(
this, Eval) <<
"Evaluating RooAddPdf without a defined normalization set. This can lead to ambiguos "
741 "coefficients definition and incorrect results."
742 <<
" Use RooAddPdf::fixCoefNormalization(nset) to provide a normalization set for "
743 "defining uniquely RooAddPdf coefficients!"
752 return {nset, cache};
766 bool nsetChanged(
false) ;
777 double snormVal = 1.;
782 double pdfVal = pdf.getVal(nset);
783 if (pdf.isSelectedComp()) {
801 for (
unsigned int pdfNo = 0; pdfNo <
_pdfList.
size(); ++pdfNo)
804 if (pdf->isSelectedComp())
806 pdfs.push_back(dataMap.
at(pdf));
839 for (std::size_t i = 0; i < end; ++i) {
842 if (pdf->observableOverlaps(nset,*coef)) {
843 coutE(InputArguments) <<
"RooAddPdf::checkObservables(" <<
GetName() <<
"): ERROR: coefficient " << coef->
GetName()
844 <<
" and PDF " << pdf->GetName() <<
" have one or more dependents in common" << endl ;
864 const RooArgSet* normSet,
const char* rangeName)
const
872 for (
const auto pdfArg :
_pdfList) {
873 auto pdf =
static_cast<const RooAbsPdf *
>(pdfArg);
875 pdf->getAnalyticalIntegralWN(allVars,subAnalVars,normSet,rangeName) ;
878 for (
const auto arg : allVars) {
879 if (!subAnalVars.
find(arg->GetName()) && pdf->
dependsOn(*arg)) {
880 allAnalVars.
remove(*arg,
true,
true) ;
887 if (allAnalVars.empty()) {
897 auto pdf =
static_cast<const RooAbsPdf *
>(arg);
899 auto allAnalVars2 = std::unique_ptr<RooArgSet>{pdf->getObservables(allAnalVars)} ;
900 subCode[
n] = pdf->getAnalyticalIntegralWN(*allAnalVars2,subAnalVars,normSet,rangeName) ;
901 if (subCode[
n]==0 && !allAnalVars2->empty()) {
902 coutE(InputArguments) <<
"RooAddPdf::getAnalyticalIntegral(" <<
GetName() <<
") WARNING: component PDF " << pdf->
GetName()
903 <<
" advertises inconsistent set of integrals (e.g. (X,Y) but not X or Y individually."
904 <<
" Distributed analytical integration disabled. Please fix PDF" << endl ;
914 analVars.
add(allAnalVars) ;
938 if (subCode.empty()) {
939 coutE(InputArguments) <<
"RooAddPdf::analyticalIntegral(" <<
GetName() <<
"): ERROR unrecognized integration code, " << code << endl ;
943 cxcoutD(Caching) <<
"RooAddPdf::aiWN(" <<
GetName() <<
") calling getProjCache with nset = " << (normSet?*normSet:
RooArgSet()) << endl ;
968 double val = pdf->analyticalIntegralWN(subCode[i],normSet,rangeName) ;
969 if (pdf->isSelectedComp()) {
987 double expectedTotal{0.0};
989 cxcoutD(Caching) <<
"RooAddPdf::expectedEvents(" <<
GetName() <<
") calling getProjCache with nset = " << (nset?*nset:
RooArgSet()) << endl ;
1000 expectedTotal += (r2.getVal()/r1.getVal()) * ncomp ;
1017 return expectedTotal ;
1063 const RooArgSet* auxProto,
bool verbose)
const
1091 std::unique_ptr<std::list<Double_t>> sumHint = nullptr ;
1092 bool needClean =
false;
1096 auto pdf =
static_cast<const RooAbsPdf*
>(arg);
1098 std::unique_ptr<std::list<Double_t>> pdfHint{pdf->
plotSamplingHint(obs,xlo,xhi)} ;
1105 sumHint = std::move(pdfHint) ;
1109 auto newSumHint = std::make_unique<std::list<Double_t>>(sumHint->size()+pdfHint->size());
1112 merge(pdfHint->begin(),pdfHint->end(),sumHint->begin(),sumHint->end(),newSumHint->begin()) ;
1115 sumHint = std::move(newSumHint) ;
1122 sumHint->erase(std::unique(sumHint->begin(),sumHint->end()), sumHint->end()) ;
1125 return sumHint.release() ;
1134 std::unique_ptr<list<Double_t>> sumBinB = nullptr ;
1135 bool needClean =
false;
1139 auto pdf =
static_cast<const RooAbsPdf *
>(arg);
1140 std::unique_ptr<list<Double_t>> pdfBinB{pdf->
binBoundaries(obs,xlo,xhi)};
1147 sumBinB = std::move(pdfBinB) ;
1151 auto newSumBinB = std::make_unique<list<Double_t>>(sumBinB->size()+pdfBinB->size()) ;
1154 merge(pdfBinB->begin(),pdfBinB->end(),sumBinB->begin(),sumBinB->end(),newSumBinB->begin()) ;
1157 sumBinB = std::move(newSumBinB) ;
1165 sumBinB->erase(std::unique(sumBinB->begin(),sumBinB->end()), sumBinB->end()) ;
1168 return sumBinB.release() ;
1177 auto pdf =
static_cast<const RooAbsPdf*
>(arg);
1178 if (pdf->dependsOn(obs) && !pdf->isBinnedDistribution(obs)) {
1194 while ((aarg=aiter.
next())) {
1196 trackNodes.
add(*aarg) ;
1225 os <<
"[%] * " << pdf->
GetName();
1236 os << pdf->GetName() ;
char * Form(const char *fmt,...)
const std::vector< Int_t > & retrieve(Int_t masterCode) const
Retrieve the array of integer codes associated with the given master code.
Int_t store(const std::vector< Int_t > &codeList, RooArgSet *set1=0, RooArgSet *set2=0, RooArgSet *set3=0, RooArgSet *set4=0)
Store given arrays of integer codes, and up to four RooArgSets in the registry (each setX pointer may...
RooAbsArg is the common abstract base class for objects that represent a value and a "shape" in RooFi...
RooArgSet * getObservables(const RooArgSet &set, Bool_t valueOnly=kTRUE) const
Given a set of possible observables, return the observables that this PDF depends on.
void clearValueAndShapeDirty() const
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.
virtual CacheMode canNodeBeCached() const
bool addOwnedComponents(const RooAbsCollection &comps)
Take ownership of the contents of 'comps'.
Bool_t isValueDirty() const
void setOperMode(OperMode mode, Bool_t recurseADirty=kTRUE)
Set the operation mode of this node.
OperMode operMode() const
Query the operation mode of this node.
Storage_t const & get() const
Const access to the underlying stl container.
RooFIter fwdIterator() const
One-time forward iterator.
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
virtual Bool_t addOwned(RooAbsArg &var, Bool_t silent=kFALSE)
Add an argument and transfer the ownership to the collection.
Storage_t::size_type size() const
RooAbsArg * first() const
virtual void Print(Option_t *options=0) const
This method must be overridden when a class wants to print itself.
const char * GetName() const
Returns name of object.
virtual Bool_t remove(const RooAbsArg &var, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE)
Remove the specified argument from our list.
RooAbsArg * find(const char *name) const
Find object with given name in list.
RooAbsGenContext is the abstract base class for generator contexts of RooAbsPdf objects.
virtual void resetErrorCounters(Int_t resetValue=10)
Reset error counter to given value, limiting the number of future error messages for this pdf to 'res...
TString _normRange
MC generator configuration specific for this object.
RooArgSet const * _normSet
Normalization integral (owned by _normMgr)
friend class RooRealIntegral
virtual Bool_t syncNormalization(const RooArgSet *dset, Bool_t adjustProxies=kTRUE) const
Verify that the normalization integral cached with this PDF is valid for given set of normalization o...
virtual Double_t expectedEvents(const RooArgSet *nset) const
Return expected number of events to be used in calculation of extended likelihood.
static Int_t _verboseEval
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 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...
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 std::list< Double_t > * binBoundaries(RooAbsRealLValue &obs, Double_t xlo, Double_t xhi) const
Retrieve bin boundaries if this distribution is binned in obs.
Double_t getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
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...
Transient cache with transformed values of coefficients.
virtual RooArgList containedArgs(Action)
List all RooAbsArg derived contents in this cache element.
RooArgList _rangeProjList
RooArgList _refRangeProjList
RooAddPdf is an efficient implementation of a sum of PDFs of the form.
RooAbsGenContext * genContext(const RooArgSet &vars, const RooDataSet *prototype=0, const RooArgSet *auxProto=0, bool verbose=false) const override
Return specialized context to efficiently generate toy events from RooAddPdfs return RooAbsPdf::genCo...
friend class RooAddGenContext
RooFit::UniqueId< RooArgSet >::Value_t _idOfLastUsedNormSet
!
std::pair< const RooArgSet *, CacheElem * > getNormAndCache(const RooArgSet *nset) const
Look up projection cache and per-PDF norm sets.
std::unique_ptr< const RooArgSet > _copyOfLastNormSet
!
bool _haveLastCoef
List of supplemental normalization factors.
Int_t getAnalyticalIntegralWN(RooArgSet &allVars, RooArgSet &numVars, const RooArgSet *normSet, const char *rangeName=0) const override
Determine which part (if any) of given integral can be performed analytically.
void updateCoefficients(CacheElem &cache, const RooArgSet *nset) const
Update the coefficient values in the given cache element: calculate new remainder fraction,...
void printMetaArgs(std::ostream &os) const override
Customized printing of arguments of a RooAddPdf to more intuitively reflect the contents of the produ...
CacheElem * getProjCache(const RooArgSet *nset, const RooArgSet *iset=0, const char *rangeName=0) const
Manager of cache with coefficient projections and transformations.
void selectNormalization(const RooArgSet *depSet=0, bool force=false) override
Interface function used by test statistics to freeze choice of observables for interpretation of frac...
void finalizeConstruction()
void setCacheAndTrackHints(RooArgSet &) override
Label OK'ed components of a RooAddPdf with cache-and-track.
RooObjCacheManager _projCacheMgr
Double_t analyticalIntegralWN(Int_t code, const RooArgSet *normSet, const char *rangeName=0) const override
Return analytical integral defined by given scenario code.
std::list< Double_t > * plotSamplingHint(RooAbsRealLValue &obs, Double_t xlo, Double_t xhi) const override
Loop over components for plot sampling hints and merge them if there are multiple.
bool checkObservables(const RooArgSet *nset) const override
Check if PDF is valid for given normalization set.
void selectNormalizationRange(const char *rangeName=0, bool force=false) override
Interface function used by test statistics to freeze choice of range for interpretation of fraction c...
void fixCoefNormalization(const RooArgSet &refCoefNorm)
By default the interpretation of the fraction coefficients is performed in the contextual choice of o...
void resetErrorCounters(Int_t resetValue=10) override
Reset error counter to given value, limiting the number of future error messages for this pdf to 'res...
double getValV(const RooArgSet *set=nullptr) const override
Calculate and return the current value.
void fixCoefRange(const char *rangeName)
By default, fraction coefficients are assumed to refer to the default fit range.
RooListProxy _pdfList
Registry of component analytical integration codes.
TNamed * _refCoefRangeName
const RooArgList & pdfList() const
void computeBatch(cudaStream_t *, double *output, size_t nEvents, RooFit::Detail::DataMap const &) const override
Compute addition of PDFs in batches.
bool isBinnedDistribution(const RooArgSet &obs) const override
If all components that depend on obs are binned, so is their sum.
std::list< Double_t > * binBoundaries(RooAbsRealLValue &, Double_t, Double_t) const override
Loop over components for plot sampling hints and merge them if there are multiple.
Double_t expectedEvents(const RooArgSet *nset) const override
Return expected number of events for extended likelihood calculation, which is the sum of all coeffic...
std::vector< double > _coefCache
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooAbsArg * at(Int_t idx) const
Return object at given index, or nullptr if index is out of range.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
RooFit::UniqueId< RooArgSet > const & uniqueId() const
Returns a unique ID that is different for every instantiated RooArgSet.
virtual void compute(cudaStream_t *, Computer, RestrictArr, size_t, const VarVector &, const ArgVector &={})=0
T * getObj(const RooArgSet *nset, Int_t *sterileIndex=0, const TNamed *isetRangeName=0)
void reset()
Clear the cache.
Int_t setObj(const RooArgSet *nset, T *obj, const TNamed *isetRangeName=0)
RooDataSet is a container class to hold unbinned data.
A one-time forward iterator working on RooLinkedList or RooAbsCollection.
RooAbsArg * next()
Return next element or nullptr if at end.
auto & at(RooAbsArg const *arg, RooAbsArg const *=nullptr)
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE) override
Reimplementation of standard RooArgList::add()
static RooMsgService & instance()
Return reference to singleton instance.
Bool_t isActive(const RooAbsArg *self, RooFit::MsgTopic facility, RooFit::MsgLevel level)
Check if logging is active for given object/topic/RooFitMsgLevel combination.
static const char * str(const TNamed *ptr)
Return C++ string corresponding to given TNamed pointer.
static const TNamed * ptr(const char *stringPtr)
Return a unique TNamed pointer for given C++ string.
static RooConstVar & value(Double_t value)
Return a constant value object with given value.
RooRealVar represents a variable that can be changed from the outside.
Class RooRecursiveFraction is a RooAbsReal implementation that calculates the plain fraction of sum o...
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...
virtual void removeAll() override
Remove all argument inset using remove(const RooAbsArg&).
The TNamed class is the base class for all named ROOT classes.
virtual const char * GetName() const
Returns name of object.
const char * Data() const
RooConstVar & RooConst(Double_t val)
std::vector< RooSpan< const double > > VarVector
R__EXTERN RooBatchComputeInterface * dispatchCUDA
R__EXTERN RooBatchComputeInterface * dispatchCPU
This dispatch pointer points to an implementation of the compute library, provided one has been loade...
std::vector< double > ArgVector
static double packFloatIntoNaN(float payload)
Pack float into mantissa of a NaN.
static void output(int code)