49 const RooArgSet&
_normSet,
const char* isetRangeName,
const char* normRangeName,
bool doFactorize) :
51 _compSetN(
"compSetN",
"Set of integral components owned by numerator",this,false),
52 _compSetD(
"compSetD",
"Set of integral components owned by denominator",this,false),
88 _compSetN(
"compSetN",
"Set of integral components owned by numerator", this),
89 _compSetD(
"compSetD",
"Set of integral components owned by denominator", this),
90 _intList(
"intList",
"List of integrals", this),
132 RooArgSet& saveSet,
const char* isetRangeName,
bool doFactorize)
138 for (
const auto arg : intSet) {
139 auto count = std::count_if(compSet.
begin(), compSet.
end(), [arg](
const RooAbsArg* pdfAsArg){
140 auto pdf = static_cast<const RooAbsPdf*>(pdfAsArg);
141 return (pdf->dependsOn(*arg));
145 anaIntSet.
add(*arg) ;
151 numIntSet.
add(intSet) ;
171 for (
const auto pdfAsArg : compSet) {
172 auto pdf =
static_cast<const RooAbsPdf*
>(pdfAsArg);
174 if (doFactorize && pdf->dependsOn(anaIntSet)) {
176 Int_t code = pdf->getAnalyticalIntegralWN(anaIntSet,anaSet,
nullptr,isetRangeName) ;
179 std::unique_ptr<RooAbsReal> pai{pdf->createIntegral(anaSet,emptyNormSet,isetRangeName)};
186 numIntSet.
remove(anaSet) ;
215 prodSet.
snapshot(prodSetClone,
false);
217 auto prod = std::make_unique<RooProduct>(prodName,
"product", prodSetClone);
222 std::unique_ptr<RooAbsReal> integral{prod->createIntegral(numIntSet,emptyNormSet,isetRangeName)};
224 auto ret = integral.get();
227 saveSet.
addOwned(std::move(prodSetClone));
229 saveSet.
addOwned(std::move(integral)) ;
true
Register systematic variations for multiple existing columns using auto-generated tags.
RooArgSet * _normSet
Pointer to set with observables used for normalization.
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
RooExpensiveObjectCache & expensiveObjectCache() const
virtual void setExpensiveObjectCache(RooExpensiveObjectCache &cache)
RooAbsArg()
Default constructor.
virtual bool remove(const RooAbsArg &var, bool silent=false, bool matchByNameOnly=false)
Remove the specified argument from our list.
virtual bool add(const RooAbsArg &var, bool silent=false)
Add the specified argument to list.
RooAbsArg * first() const
virtual bool addOwned(RooAbsArg &var, bool silent=false)
Add an argument and transfer the ownership to the collection.
TIterator end() and range-based for loops.")
Abstract interface for all probability density functions.
RooAbsReal()
coverity[UNINIT_CTOR] Default constructor
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.
void operModeHook() override
Intercept cache mode operation changes and propagate them to the components.
double 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 doFactorize)
Utility function to create integral for product over certain observables.
RooSetProxy _compSetD
Set proxy for denominator components.
RooListProxy _intList
Master integrals representing numerator and denominator.
std::unique_ptr< RooArgSet > _compSetOwnedN
Owner of numerator components.
std::unique_ptr< RooArgSet > _compSetOwnedD
Owner of denominator components.
bool _haveD
Do we have a denominator term?
RooGenProdProj(const char *name, const char *title, const RooArgSet &_prodSet, const RooArgSet &_intSet, const RooArgSet &_normSet, const char *isetRangeName, const char *normRangeName=nullptr, bool doFactorize=true)
Constructor for a normalization projection of the product of p.d.f.s _prodSet integrated over _intSet...
RooSetProxy _compSetN
Set proxy for numerator components.
const char * GetName() const override
Returns name of object.