101 _pdfList(
"!pdfs",
"List of PDFs",this),
136 _pdfList(
"!pdfs",
"List of PDFs",this),
156 coutW(InputArguments) <<
"RooProdPdf::RooProdPdf(" <<
GetName()
157 <<
") multiple components with extended terms detected,"
158 <<
" product will not be extendible." << endl ;
191 _pdfList(
"!pdfs",
"List of PDFs",this),
199 Int_t numExtended(0) ;
203 coutW(InputArguments) <<
"RooProdPdf::RooProdPdf(" <<
GetName() <<
") list arg "
204 << arg->
GetName() <<
" is not a PDF, ignored" << endl ;
220 coutW(InputArguments) <<
"RooProdPdf::RooProdPdf(" <<
GetName()
221 <<
") WARNING: multiple components with extended terms detected,"
222 <<
" product will not be extendible." << endl ;
273 _pdfList(
"!pdfs",
"List of PDFs",this),
303 _pdfList(
"!pdfList",
"List of PDFs",this),
329 _pdfList(
"!pdfs",
"List of PDFs",this),
346 _cacheMgr(other._cacheMgr,this),
347 _genCode(other._genCode),
348 _cutOff(other._cutOff),
349 _pdfList(
"!pdfs",this,other._pdfList),
350 _extendedIndex(other._extendedIndex),
351 _useDefaultGen(other._useDefaultGen),
352 _refRangeName(other._refRangeName),
353 _selfNorm(other._selfNorm),
354 _defNormSet(other._defNormSet)
375 Int_t numExtended(0) ;
397 if (0 == strcmp(carg->
GetName(),
"Conditional")) {
409 tmp->
setName(0 == argType ?
"nset" :
"cset") ;
419 }
else if (0 != strlen(carg->
GetName())) {
420 coutW(InputArguments) <<
"Unknown arg: " << carg->
GetName() << endl ;
426 coutW(InputArguments) <<
"RooProdPdf::RooProdPdf(" <<
GetName()
427 <<
") WARNING: multiple components with extended terms detected,"
428 <<
" product will not be extendible." << endl ;
478 cxcoutD(Eval) <<
"RooProdPdf::calculate(" <<
GetName() <<
") rearranged product calculation"
492 const auto normSet = cache.
_normList[i].get();
494 const Double_t piVal = partInt.getVal(normSet->getSize() > 0 ? normSet :
nullptr);
516 if (cache->_isRearranged) {
517 auto numerator = cache->
_rearrangedNum->getValues(evalData, normSet);
518 auto denominator = cache->_rearrangedDen->getValues(evalData, normSet);
519 auto outputs = evalData.
makeBatch(
this, numerator.size());
521 for (std::size_t i=0; i < outputs.size(); ++i) {
522 outputs[i] = numerator[i] / denominator[i];
527 assert(cache->_normList.size() == cache->_partList.size());
529 for (std::size_t i = 0; i < cache->_partList.size(); ++i) {
530 const auto& partInt =
static_cast<const RooAbsReal&
>(cache->_partList[i]);
531 const auto partNorm = cache->_normList[i].get();
533 const auto partialInt = partInt.
getValues(evalData, partNorm->getSize() > 0 ? partNorm :
nullptr);
535 if (outputs.
empty()) {
536 outputs = evalData.
makeBatch(
this, partialInt.size());
537 for (
double& val : outputs) val = 1.;
540 for (std::size_t j=0; j < outputs.
size(); ++j) {
541 outputs[j] *= partialInt[j];
573 (pdfNSetOrig = (
RooArgSet*) nIter.next(),
578 if (0 == strcmp(
"nset", pdfNSetOrig->
GetName())) {
581 }
else if (0 == strcmp(
"cset", pdfNSetOrig->
GetName())) {
584 pdfCSet = pdfNSetOrig;
598 pdfAllDeps.
add(*tmp);
608 pdfNormDeps.
add(*tmp2);
612 pdfNormDeps.
add(pdfAllDeps);
635 (termNormDeps = (
RooArgSet*) ldIter.next(),
636 termAllDeps = (
RooArgSet*) laIter.next(),
654 termIntDeps =
new RooArgSet(
"termIntDeps");
657 if (!termIntNoNormDeps) {
658 termIntNoNormDeps =
new RooArgSet(
"termIntNoNormDeps");
660 termIntNoNormDeps->
add(pdfIntNoNormDeps,
kFALSE);
671 termNormDeps =
new RooArgSet(
"termNormDeps");
672 termAllDeps =
new RooArgSet(
"termAllDeps");
673 termIntDeps =
new RooArgSet(
"termIntDeps");
674 termIntNoNormDeps =
new RooArgSet(
"termIntNoNormDeps");
680 termIntNoNormDeps->
add(pdfIntNoNormDeps,
kFALSE);
683 normList.
Add(termNormDeps);
684 depAllList.
Add(termAllDeps);
685 intList.
Add(termIntDeps);
686 depIntNoNormList.
Add(termIntNoNormDeps);
693 if (pdfCSet != pdfNSetOrig) {
699 RooArgSet *normDeps, *allDeps, *intNoNormDeps;
706 intNoNormDeps = (
RooArgSet*) innIter.next(),
723 depIntNoNormList.
Delete();
745 Int_t sterileIdx(-1);
779 map<string, RooArgSet> ratioTerms;
781 if (1 ==
group->GetSize()) {
789 RooArgSet termNSet(*norm), termImpSet(*imps);
800 RooFIter niter = termNSet.fwdIterator();
817 if (!rangeIdentical ) {
820 ostringstream str; termImpSet.
printValue(str);
822 ratioTerms[str.str()].add(*ratio);
837 RooArgSet termNSet(*norm), termImpSet(*imps);
843 RooFIter niter = termNSet.fwdIterator();
858 if (!rangeIdentical ) {
861 ostringstream str; termImpSet.
printValue(str);
862 ratioTerms[str.str()].add(*ratio);
874 if (1 ==
group->GetSize()) {
880 RooArgSet termNSet(*norm), termImpSet(*imps);
883 ostringstream str; termNSet.printValue(str);
884 if (ratioTerms[str.str()].getSize() > 0) {
886 term->
add(ratioTerms[str.str()]);
896 RooArgSet termNSet(*norm), termImpSet(*imps);
899 ostringstream str; termNSet.printValue(str);
900 if (ratioTerms[str.str()].getSize() > 0) {
902 term->
add(ratioTerms[str.str()]);
913 if (1 ==
group->GetSize()) {
923 RooArgSet termNSet, termISet, termXSet, termImpSet;
926 termISet.
add(*integ);
930 termXSet.
add(*xdeps);
931 termImpSet.
add(*imps);
940 vector<RooAbsReal*> func =
processProductTerm(nset, iset, isetRangeName, term, termNSet, termISet, isOwned);
955 RooArgSet compTermSet, compTermNorm, compTermNum, compTermDen;
966 RooArgSet termNSet, termISet, termXSet, termImpSet;
967 termISet.
add(*integ);
969 termXSet.
add(*xdeps);
970 termImpSet.
add(*imps);
982 vector<RooAbsReal*> func =
processProductTerm(nset, iset, isetRangeName, term, termNSet, termISet, isOwned,
kTRUE);
985 compTermSet.
add(*func[0]);
989 compTermNum.
add(*func[1]);
990 compTermDen.
add(*func[2]);
1009 const std::string prodname =
makeRGPPName(
"SPECPROD", compTermSet, outerIntDeps,
RooArgSet(), isetRangeName);
1013 const std::string intname =
makeRGPPName(
"SPECINT", compTermSet, outerIntDeps,
RooArgSet(), isetRangeName);
1022 RooProduct* prodtmp_num =
new RooProduct(prodname_num.c_str(), prodname_num.c_str(), compTermNum);
1028 RooProduct* prodtmp_den =
new RooProduct(prodname_den.c_str(), prodname_den.c_str(), compTermDen);
1033 string name =
Form(
"SPEC_RATIO(%s,%s)", prodname_num.c_str(), prodname_den.c_str());
1114 list<string> rangeComps ;
1119 char* token = R__STRTOK_R(buf,
",",&save) ;
1121 rangeComps.push_back(token) ;
1122 token = R__STRTOK_R(0,
",",&save) ;
1128 map<string,RooArgSet> denListList ;
1130 string specIntRange ;
1173 nomList.
add(*funcCust) ;
1175 nomList.
add(*func) ;
1196 origNumTerm.
add(*arg) ;
1204 nomList.
add(origNumTerm) ;
1211 for (list<string>::iterator iter = rangeComps.begin() ; iter != rangeComps.end() ; ++iter) {
1257 partCust = cust.
build() ;
1262 partCust = cust.
build() ;
1272 string name =
Form(
"%s_divided_by_ratio",specializedPartCust->
GetName()) ;
1275 denListList[*iter].add(*specIntFinal) ;
1296 tmp.
add(*specRatio) ;
1308 throw string(
"this should not happen") ;
1314 denListList[*iter].add(*specIntFinal) ;
1336 for (map<string,RooArgSet>::iterator iter = denListList.begin() ; iter != denListList.end() ; ++iter) {
1341 products.
add(*prod_comp) ;
1347 if (specIntDeps.
getSize()>0) {
1356 numerator = numtmp ;
1456 outerIntDeps.
add(*tmp) ;
1483 if (termNormDeps->
contains(*outerIntDep) ||
1484 termIntDeps->
contains(*outerIntDep) ||
1485 termImpDeps->
contains(*outerIntDep)) {
1498 tIter2 =
group->fwdIterator() ;
1500 newGroup->
Add(term2) ;
1510 groupedTerms.
Add(newGroup) ;
1536 vector<RooAbsReal*> ret(3) ; ret[0] = 0 ; ret[1] = 0 ; ret[2] = 0 ;
1552 if (nset && termNSet.
getSize()==0) {
1560 if (iset && termISet.
getSize()>0) {
1591 const std::string
name =
makeRGPPName(
"GENPROJ_",*term,termISet,termNSet,isetRangeName) ;
1618 const std::string
name =
makeRGPPName(
"GENPROJ_",*term,termISet,termNSet,isetRangeName) ;
1651 name.Append(
"_NORM[") ;
1698 coutE(Eval) <<
"RooProdPdf::processProductTerm(" <<
GetName() <<
") unidentified term!!!" << endl ;
1709 const RooArgSet& nset,
const char* isetRangeName)
const
1713 std::ostringstream os(pfx);
1721 if (!
first) os <<
"_X_";
1758 const RooArgSet* normSet,
const char* rangeName)
const
1763 analVars.
add(allVars) ;
1844 coutF(Generation) <<
"Requesting expected number of events from a RooProdPdf that does not contain an extended p.d.f" << endl ;
1845 throw std::logic_error(std::string(
"RooProdPdf ") +
GetName() +
" could not be extended.");
1884 std::vector<Int_t> code;
1890 code.push_back(pdfCode);
1892 generateVars.
add(pdfDirect) ;
1897 if (generateVars.
getSize()>0) {
1899 return masterCode+1 ;
1920 if (codeList[i]!=0) {
1943 if (codeList[i]!=0) {
1975 os <<
indent <<
"RooProdPdf begin partial integral cache" << endl ;
1978 RooFIter iter = _partList.fwdIterator() ;
1981 indent2 +=
Form(
"[%d] ",curElem) ;
1986 if (curElem==maxElem) {
1987 os <<
indent <<
"RooProdPdf end partial integral cache" << endl ;
2011 if (thePdf)
return kFALSE ;
2028 if (idx<0)
return 0 ;
2052 constraints.
add(*pdf) ;
2068 finalConstraints->
add(*pdf) ;
2070 coutI(Minimization) <<
"RooProdPdf::getConstraints(" <<
GetName() <<
") omitting term " << pdf->
GetName()
2071 <<
" as constraint term as it does not share any parameters with the other pdfs in product. "
2072 <<
"To force inclusion in likelihood, add an explicit Constrain() argument for the target parameter" << endl ;
2083 return finalConstraints ;
2100 if (arg->dependsOn(observables)) {
2101 RooArgSet* tmp = arg->getParameters(observables) ;
2102 connectedPars->
add(*tmp) ;
2106 return connectedPars ;
2116 if (!stripDisconnected) return ;
2117 if (!nset || nset->
getSize()==0) return ;
2125 for (
auto param : *params) {
2127 for (
auto term : plist) {
2128 if (term->dependsOnValue(*param)) {
2133 tostrip.
add(*param) ;
2237 if (parg->canNodeBeCached()==
Always) {
2238 trackNodes.
add(*parg) ;
2245 if (
string(
"nset")==pdf_nset->
GetName() && pdf_nset->
getSize()>0) {
2247 parg->setStringAttribute(
"CATNormSet",
n.content()) ;
2249 if (
string(
"cset")==pdf_nset->
GetName()) {
2251 parg->setStringAttribute(
"CATCondSet",
c.content()) ;
2254 coutW(Optimization) <<
"RooProdPdf::setCacheAndTrackHints(" <<
GetName() <<
") WARNING product pdf does not specify a normalization set for component " << parg->GetName() << endl ;
2270 if (i>0) os <<
" * " ;
2274 if (
string(
"nset")==ncset->
GetName()) {
2304 cxcoutD(LinkStateMgmt) <<
"RooProdPdf::redirectServersHook(" <<
GetName() <<
"): removing REMOVAL_DUMMY" << endl ;
static void indent(ostringstream &buf, int indent_level)
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...
RooExpensiveObjectCache & expensiveObjectCache() const
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 printCompactTree(const char *indent="", const char *fileName=0, const char *namePat=0, RooAbsArg *client=0)
Print tree structure of expression tree on stdout, or to file if filename is specified.
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 setStringAttribute(const Text_t *key, const Text_t *value)
Associate string 'value' to this object under key 'key'.
virtual TObject * Clone(const char *newname=0) const
Make a clone of an object using the Streamer facility.
virtual void setExpensiveObjectCache(RooExpensiveObjectCache &cache)
const Text_t * getStringAttribute(const Text_t *key) const
Get string attribute mapped under key 'key'.
void setAttribute(const Text_t *name, Bool_t value=kTRUE)
Set (default) or clear a named boolean attribute of this object.
void setOperMode(OperMode mode, Bool_t recurseADirty=kTRUE)
Set the operation mode of this node.
Bool_t addOwnedComponents(const RooArgSet &comps)
Take ownership of the contents of 'comps'.
Bool_t getAttribute(const Text_t *name) const
Check if a named attribute is set. By default, all attributes are unset.
Bool_t dependsOnValue(const RooAbsCollection &serverList, const RooAbsArg *ignoreArg=0) const
Check whether this object depends on values from an element in the serverList.
RooArgSet * getComponents() const
Create a RooArgSet with all components (branch nodes) of the expression tree headed by this object.
RooArgSet * getParameters(const RooAbsData *data, bool stripDisconnected=true) const
Create a list of leaf nodes in the arg tree starting with ourself as top node that don't match any of...
OperMode operMode() const
Query the operation mode of this node.
RooAbsCacheElement is the abstract base class for objects to be stored in RooAbsCache cache manager o...
RooAbsCollection is an abstract container object that can hold multiple RooAbsArg objects.
virtual void removeAll()
Remove all arguments from our set, deleting them if we own them.
RooAbsCollection * selectCommon(const RooAbsCollection &refColl) const
Create a subset of the current collection, consisting only of those elements that are contained as we...
Bool_t contains(const RooAbsArg &var) const
Check if collection contains an argument with the same name as var.
virtual Bool_t addOwned(RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
Int_t index(const RooAbsArg *arg) const
Returns index of given arg, or -1 if arg is not in the collection.
RooFIter fwdIterator() const
One-time forward iterator.
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
Storage_t::size_type size() const
RooAbsArg * first() const
Bool_t overlaps(const RooAbsCollection &otherColl) const
Check if this and other collection have common entries.
const char * GetName() const
Returns name of object.
void setName(const char *name)
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.
virtual void printValue(std::ostream &os) const
Print value of collection, i.e.
RooAbsGenContext is the abstract base class for generator contexts of RooAbsPdf objects.
virtual void generateEvent(Int_t code)
Interface for generation of an event using the algorithm corresponding to the specified code.
virtual RooAbsGenContext * genContext(const RooArgSet &vars, const RooDataSet *prototype=0, const RooArgSet *auxProto=0, Bool_t verbose=kFALSE) const
Interface function to create a generator context from a p.d.f.
TString _normRange
MC generator configuration specific for this object.
RooArgSet const * _normSet
Normalization integral (owned by _normMgr)
virtual Int_t getGenerator(const RooArgSet &directVars, RooArgSet &generateVars, Bool_t staticInitOK=kTRUE) const
Load generatedVars with the subset of directVars that we can generate events for, and return a code t...
Bool_t canBeExtended() const
If true, PDF can provide extended likelihood term.
friend class RooRealIntegral
const char * normRange() const
virtual Bool_t isDirectGenSafe(const RooAbsArg &arg) const
Check if given observable can be safely generated using the pdfs internal generator mechanism (if tha...
virtual void initGenerator(Int_t code)
Interface for one-time initialization to setup the generator for the specified code.
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...
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...
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.
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...
Double_t getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
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 > * 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...
virtual Bool_t isBinnedDistribution(const RooArgSet &) const
Tests if the distribution is binned. Unless overridden by derived classes, this always returns false.
RooAddition calculates the sum of a set of RooAbsReal terms, or when constructed with two sets,...
const RooArgList & list1() const
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.
RooArgSet * snapshot(bool deepCopy=true) const
Use RooAbsCollection::snapshot(), but return as RooArgSet.
Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE) override
Add element to non-owning set.
T * getObj(const RooArgSet *nset, Int_t *sterileIndex=0, const TNamed *isetRangeName=0)
const RooNameSet * nameSet2ByIndex(Int_t index) const
Retrieve RooNameSet associated with slot at given index.
T * getObjByIndex(Int_t index) const
Retrieve payload object by slot index.
void reset()
Clear the cache.
const RooNameSet * nameSet1ByIndex(Int_t index) const
Retrieve RooNameSet associated with slot at given index.
Int_t setObj(const RooArgSet *nset, T *obj, const TNamed *isetRangeName=0)
RooCmdArg is a named container for two doubles, two integers two object points and three string point...
const RooArgSet * getSet(Int_t idx) const
Return RooArgSet stored in slot idx.
Int_t getInt(Int_t idx) const
virtual TObject * clone(const char *newname) const
RooCustomizer is a factory class to produce clones of a prototype composite PDF object with the same ...
void replaceArg(const RooAbsArg &orig, const RooAbsArg &subst)
Replace any occurence of arg 'orig' with arg 'subst'.
RooAbsArg * build(const char *masterCatState, Bool_t verbose=kFALSE)
Build a clone of the prototype executing all registered 'replace' rules and 'split' rules for the mas...
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.
RooGenProdProj is an auxiliary class for RooProdPdf that calculates a general normalised projection o...
RooLinkedList is an collection class for internal use, storing a collection of RooAbsArg pointers in ...
RooFIter fwdIterator() const
Create a one-time-use forward iterator for this list.
TObject * At(Int_t index) const
Return object stored in sequential position given by index.
void Delete(Option_t *o=0)
Remove all elements in collection and delete all elements NB: Collection does not own elements,...
virtual void Add(TObject *arg)
virtual Bool_t Remove(TObject *arg)
Remove object from collection.
Int_t IndexOf(const char *name) const
Return position of given object in list.
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE) override
Reimplementation of standard RooArgList::add()
virtual Bool_t remove(const RooAbsArg &var, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE) override
Reimplementation of standard RooArgList::remove()
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.
RooNameSet is a utility class that stores the names the objects in a RooArget.
RooArgSet * select(const RooArgSet &list) const
Construct a RooArgSet of objects in input 'list' whose names match to those in the internal name list...
virtual void printCompactTreeHook(std::ostream &, const char *, Int_t, Int_t)
Hook function to print cache contents in tree printing of RooProdPdf.
std::unique_ptr< RooAbsReal > _rearrangedNum
std::vector< std::unique_ptr< RooArgSet > > _normList
std::unique_ptr< RooAbsReal > _rearrangedDen
virtual RooArgList containedArgs(Action)
Return RooAbsArg components contained in the cache.
RooProdPdf is an efficient implementation of a product of PDFs of the form.
void rearrangeProduct(CacheElem &) const
virtual Double_t expectedEvents(const RooArgSet *nset) const
Return the expected number of events associated with the extendable input PDF in the product.
void factorizeProduct(const RooArgSet &normSet, const RooArgSet &intSet, RooLinkedList &termList, RooLinkedList &normList, RooLinkedList &impDepList, RooLinkedList &crossDepList, RooLinkedList &intList) const
Factorize product in irreducible terms for given choice of integration/normalization.
void groupProductTerms(RooLinkedList &groupedTerms, RooArgSet &outerIntDeps, const RooLinkedList &terms, const RooLinkedList &norms, const RooLinkedList &imps, const RooLinkedList &ints, const RooLinkedList &cross) const
Group product into terms that can be calculated independently.
Int_t getPartIntList(const RooArgSet *nset, const RooArgSet *iset, const char *isetRangeName=0) const
Return list of (partial) integrals of product terms for integration of p.d.f over observables iset wh...
RooProdPdf()
Default constructor.
virtual Bool_t checkObservables(const RooArgSet *nset) const
Obsolete.
Double_t _cutOff
Registry of composite direct generator codes.
void printMetaArgs(std::ostream &os) const
Customized printing of arguments of a RooProdPdf to more intuitively reflect the contents of the prod...
virtual RooSpan< double > evaluateSpan(RooBatchCompute::RunContext &evalData, const RooArgSet *normSet) const
Evaluate product of PDFs using input data in evalData.
Double_t evaluate() const
Calculate current value of object.
Bool_t isBinnedDistribution(const RooArgSet &obs) const
If all components that depend on obs are binned that so is the product.
virtual Bool_t isDirectGenSafe(const RooAbsArg &arg) const
Forward determination of safety of internal generator code to component p.d.f that would generate the...
Int_t getAnalyticalIntegralWN(RooArgSet &allVars, RooArgSet &numVars, const RooArgSet *normSet, const char *rangeName=0) const
Determine which part (if any) of given integral can be performed analytically.
RooAbsReal * specializeIntegral(RooAbsReal &orig, const char *targetRangeName) const
virtual ExtendMode extendMode() const
If this product contains exactly one extendable p.d.f return the extension abilities of that p....
RooObjCacheManager _cacheMgr
virtual void initGenerator(Int_t code)
Forward one-time initialization call to component generation initialization methods.
std::string makeRGPPName(const char *pfx, const RooArgSet &term, const RooArgSet &iset, const RooArgSet &nset, const char *isetRangeName) const
Make an appropriate automatic name for a RooGenProdProj object in getPartIntList()
Double_t analyticalIntegralWN(Int_t code, const RooArgSet *normSet, const char *rangeName=0) const
Return analytical integral defined by given scenario code.
virtual ~RooProdPdf()
Destructor.
virtual void getParametersHook(const RooArgSet *, RooArgSet *, Bool_t stripDisconnected) const
RooAbsReal * makeCondPdfRatioCorr(RooAbsReal &term, const RooArgSet &termNset, const RooArgSet &termImpSet, const char *normRange, const char *refRange) const
For single normalization ranges.
RooArgSet * findPdfNSet(RooAbsPdf &pdf) const
Look up user specified normalization set for given input PDF component.
virtual void setCacheAndTrackHints(RooArgSet &)
Label OK'ed components of a RooProdPdf with cache-and-track, and label all RooProdPdf descendants wit...
virtual RooArgSet * getConstraints(const RooArgSet &observables, RooArgSet &constrainedParams, Bool_t stripDisconnected) const
Return all parameter constraint p.d.f.s on parameters listed in constrainedParams.
RooLinkedList _pdfNSetList
friend class RooProdGenContext
virtual Int_t getGenerator(const RooArgSet &directVars, RooArgSet &generateVars, Bool_t staticInitOK=kTRUE) const
Query internal generation capabilities of component p.d.f.s and aggregate capabilities into master co...
virtual void selectNormalizationRange(const char *rangeName=0, Bool_t force=kFALSE)
Interface function used by test statistics to freeze choice of range for interpretation of conditiona...
RooArgSet * getConnectedParameters(const RooArgSet &observables) const
Return all parameter constraint p.d.f.s on parameters listed in constrainedParams.
Double_t calculate(const RooProdPdf::CacheElem &cache, Bool_t verbose=kFALSE) const
Calculate running product of pdfs terms, using the supplied normalization set in 'normSetList' for ea...
virtual std::list< Double_t > * plotSamplingHint(RooAbsRealLValue &obs, Double_t xlo, Double_t xhi) const
Forward the plot sampling hint from the p.d.f. that defines the observable obs.
RooAbsReal * specializeRatio(RooFormulaVar &input, const char *targetRangeName) const
Bool_t redirectServersHook(const RooAbsCollection &, Bool_t, Bool_t, Bool_t)
Implement support for node removal.
void fixRefRange(const char *rangeName)
virtual Bool_t forceAnalyticalInt(const RooAbsArg &dep) const
Force RooRealIntegral to offer all observables for internal integration.
virtual TObject * clone(const char *newname) const
virtual RooAbsGenContext * genContext(const RooArgSet &vars, const RooDataSet *prototype=0, const RooArgSet *auxProto=0, Bool_t verbose=kFALSE) const
Return generator context optimized for generating events from product p.d.f.s.
void initializeFromCmdArgList(const RooArgSet &fullPdfSet, const RooLinkedList &l)
Initialize RooProdPdf configuration from given list of RooCmdArg configuration arguments and set of '...
virtual void generateEvent(Int_t code)
Generate a single event with configuration specified by 'code' Defer internal generation to component...
std::vector< RooAbsReal * > processProductTerm(const RooArgSet *nset, const RooArgSet *iset, const char *isetRangeName, const RooArgSet *term, const RooArgSet &termNSet, const RooArgSet &termISet, Bool_t &isOwned, Bool_t forceWrap=kFALSE) const
Calculate integrals of factorized product terms over observables iset while normalized to observables...
virtual std::list< Double_t > * binBoundaries(RooAbsRealLValue &, Double_t, Double_t) const
Forward the plot sampling hint from the p.d.f. that defines the observable obs.
A RooProduct represents the product of a given set of RooAbsReal objects.
RooRealIntegral performs hybrid numerical/analytical integrals of RooAbsReal objects.
RooArgSet intVars() const
const RooAbsReal & integrand() const
RooRealVar represents a variable that can be changed from the outside.
A simple container to hold a batch of data values.
constexpr std::span< T >::index_type size() const noexcept
constexpr bool empty() const noexcept
The TNamed class is the base class for all named ROOT classes.
virtual const char * GetName() const
Returns name of object.
Mother of all ROOT objects.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
const char * Data() const
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
RooConstVar & RooConst(Double_t val)
This struct enables passing computation data around between elements of a computation graph.
RooSpan< double > makeBatch(const RooAbsReal *owner, std::size_t size)
Create a writable batch.