65 const RooArgSet& _normSet,
const char* isetRangeName,
const char* normRangeName,
Bool_t doFactorize) :
69 _compSetN(
"compSetN",
"Set of integral components owned by numerator",this,
kFALSE),
70 _compSetD(
"compSetD",
"Set of integral components owned by denominator",this,
kFALSE),
71 _intList(
"intList",
"List of integrals",this,
kTRUE),
109 _compSetN(
"compSetN",
"Set of integral components owned by numerator",this),
110 _compSetD(
"compSetD",
"Set of integral components owned by denominator",this),
111 _intList(
"intList",
"List of integrals",this)
182 for (
const auto arg : intSet) {
183 auto count = std::count_if(compSet.
begin(), compSet.
end(), [arg](
const RooAbsArg* pdfAsArg){
184 auto pdf = static_cast<const RooAbsPdf*>(pdfAsArg);
185 return (pdf->dependsOn(*arg));
189 anaIntSet.
add(*arg) ;
195 numIntSet.
add(intSet) ;
197 for (
const auto pdfAsArg : compSet) {
198 auto pdf =
static_cast<const RooAbsPdf*
>(pdfAsArg);
200 if (doFactorize && pdf->dependsOn(anaIntSet)) {
202 Int_t code = pdf->getAnalyticalIntegralWN(anaIntSet,anaSet,0,isetRangeName) ;
212 numIntSet.
remove(anaSet) ;
241 prodSet.
snapshot(prodSetClone,
false);
243 auto prod = std::make_unique<RooProduct>(prodName,
"product", prodSetClone);
248 std::unique_ptr<RooAbsReal> integral{prod->createIntegral(numIntSet,isetRangeName)};
250 auto ret = integral.get();
253 saveSet.
addOwned(std::move(prodSetClone));
255 saveSet.
addOwned(std::move(integral)) ;
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
RooAbsArg is the common abstract base class for objects that represent a value and a "shape" in RooFi...
RooExpensiveObjectCache & expensiveObjectCache() const
virtual void setExpensiveObjectCache(RooExpensiveObjectCache &cache)
void setOperMode(OperMode mode, Bool_t recurseADirty=kTRUE)
Set the operation mode of this node.
OperMode _operMode
Mark batches as dirty (only meaningful for RooAbsReal).
void removeServer(RooAbsArg &server, Bool_t force=kFALSE)
Unregister another RooAbsArg as a server to us, ie, declare that we no longer depend on its value and...
TIterator * serverIterator() const
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
const_iterator end() const
virtual Bool_t addOwned(RooAbsArg &var, Bool_t silent=kFALSE)
Add an argument and transfer the ownership to the collection.
RooAbsArg * first() const
const_iterator begin() const
virtual Bool_t remove(const RooAbsArg &var, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE)
Remove the specified argument from our list.
TIterator * createIterator(Bool_t dir=kIterForward) const
TIterator-style iteration over contained elements.
RooAbsArg * find(const char *name) const
Find object with given name in list.
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 ...
Double_t getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
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 add(const RooAbsArg &var, bool valueServer, bool shapeServer, bool silent)
Overloaded RooCollection_t::add() method insert object into set and registers object as server to own...
RooGenProdProj is an auxiliary class for RooProdPdf that calculates a general normalised projection o...
void operModeHook() override
Intercept cache mode operation changes and propagate them to the components.
RooGenProdProj()
Default constructor.
~RooGenProdProj() override
Destructor.
RooSetProxy _compSetD
Set proxy for denominator components.
RooListProxy _intList
Master integrals representing numerator and denominator.
Bool_t _haveD
Do we have a denominator term?
RooArgSet * _compSetOwnedD
Owner of denominator components.
Double_t evaluate() const override
Calculate and return value of normalization projection.
RooAbsReal * makeIntegral(const char *name, const RooArgSet &compSet, const RooArgSet &intSet, RooArgSet &saveSet, const char *isetRangeName, Bool_t doFactorize)
Utility function to create integral for product over certain observables.
RooArgSet * _compSetOwnedN
Owner of numerator components.
RooSetProxy _compSetN
Set proxy for numerator components.
Iterator abstract base class.
virtual TObject * Next()=0
const char * GetName() const override
Returns name of object.