55   intpdf(
"!IntegratedPdf",
"intpdf",this,_intpdf,false,false),
 
   56   intobs(
"!IntegrationObservables",
"intobs",this,false,true),
 
   57   deps(
"!Dependents",
"deps",this,true,false),
 
   66   for(
RooAbsArg* server : proj->servers()) {
 
   67     if(server->isShapeServer(*proj)) {
 
   69     } 
else if(server->isValueServer(*proj)) {
 
   82   intpdf(
"!IntegratedPdf",this,other.intpdf),
 
   83   intobs(
"!IntegrationObservable",this,other.intobs),
 
   84   deps(
"!Dependents",this,other.deps),
 
   85   _cacheMgr(other._cacheMgr,this)
 
  113  Int_t sterileIdx(-1) ;
 
  116    return static_cast<const RooAbsReal*
>(cache->_projection.get());
 
  131  coutI(Integration) << 
"RooProjectedPdf::getProjection(" << 
GetName() << 
") creating new projection " 
  132                     << cache->_projection->GetName() << 
" with code " << code << std::endl;
 
  134  return cache->_projection.get();
 
  169  analVars.
add(allVars) ;
 
  188    return cache->_projection->getVal() ;
 
  212                                          bool nameChange, 
bool isRecursive)
 
  220    newPdf->getParameters(&
intobs, newdeps);
 
  223    newdeps.
remove(common,
true,
true) ;
 
  224    olddeps.
remove(common,
true,
true) ;
 
  227    if (!newdeps.
empty()) {
 
  230    if (!olddeps.
empty()) {
 
  268    os << 
indent << 
"RooProjectedPdf begin projection cache" << std::endl ;
 
  272  indent2 += 
Form(
"[%d] ",curElem) ;
 
  274  _projection->printCompactTree(os,indent2) ;
 
  276  if(curElem==maxElem) {
 
  277    os << 
indent << 
"RooProjectedPdf end projection cache" << std::endl ;
 
  282std::unique_ptr<RooAbsArg>
 
static void indent(ostringstream &buf, int indent_level)
 
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...
 
RooFit::OwningPtr< 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...
 
RooFit::OwningPtr< RooArgSet > getObservables(const RooArgSet &set, bool valueOnly=true) const
Given a set of possible observables, return the observables that this PDF depends on.
 
RooAbsCollection is an abstract container object that can hold multiple RooAbsArg objects.
 
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.
 
bool selectCommon(const RooAbsCollection &refColl, RooAbsCollection &outColl) const
Create a subset of the current collection, consisting only of those elements that are contained as we...
 
RooAbsArg * find(const char *name) const
Find object with given name in list.
 
RooArgSet const  * _normSet
Normalization integral (owned by _normMgr)
 
const char * normRange() const
 
bool redirectServersHook(const RooAbsCollection &newServerList, bool mustReplaceAll, bool nameChange, bool isRecursiveStep) override
The cache manager.
 
virtual RooAbsPdf * createProjection(const RooArgSet &iset)
Return a p.d.f that represent a projection of this p.d.f integrated over given observables.
 
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
 
double getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
 
RooFit::OwningPtr< 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 std::liste...
 
RooArgList is a container object that can hold multiple RooAbsArg objects.
 
RooArgSet is a container object that can hold multiple RooAbsArg objects.
 
Int_t setObj(const RooArgSet *nset, T *obj, const TNamed *isetRangeName=nullptr)
Setter function without integration set.
 
RooArgSet selectFromSet1(RooArgSet const &argSet, int index) const
Create RooArgSet contatining the objects that are both in the cached set 1.
 
T * getObjByIndex(Int_t index) const
Retrieve payload object by slot index.
 
RooArgSet selectFromSet2(RooArgSet const &argSet, int index) const
Create RooArgSet contatining the objects that are both in the cached set 2.
 
Int_t lastIndex() const
Return index of slot used in last get or set operation.
 
T * getObj(const RooArgSet *nset, Int_t *sterileIndex=nullptr, const TNamed *isetRangeName=nullptr)
Getter function without integration set.
 
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...
 
bool remove(const RooAbsArg &var, bool silent=false, bool matchByNameOnly=false) override
Remove object 'var' from set and deregister 'var' as server to owner.
 
void markAsCompiled(RooAbsArg &arg) const
 
static const TNamed * ptr(const char *stringPtr)
Return a unique TNamed pointer for given C++ string.
 
RooArgList containedArgs(Action) override
Return RooAbsArg elements contained in projection cache element.
 
void printCompactTreeHook(std::ostream &, const char *, Int_t, Int_t) override
Print contents of cache when printing self as part of object tree.
 
std::unique_ptr< RooAbsReal > _projection
 
Class RooProjectedPdf is a RooAbsPdf implementation that represent a projection of a given input p....
 
RooRealProxy intpdf
p.d.f that is integrated
 
RooObjCacheManager _cacheMgr
! The cache manager
 
double evaluate() const override
Evaluate projected p.d.f.
 
double analyticalIntegralWN(Int_t code, const RooArgSet *normSet, const char *rangeName=nullptr) const override
Return analytical integral represent by appropriate element of projection cache.
 
bool forceAnalyticalInt(const RooAbsArg &dep) const override
Force RooRealIntegral to relegate integration of all observables to internal logic.
 
bool redirectServersHook(const RooAbsCollection &newServerList, bool, bool, bool) override
Intercept a server redirection all and update list of dependents if necessary Specifically update the...
 
RooAbsPdf * createProjection(const RooArgSet &iset) override
Special version of RooAbsReal::createProjection that deals with projections of projections.
 
void printMetaArgs(std::ostream &os) const override
Customized printing of arguments of a RooRealIntegral to more intuitively reflect the contents of the...
 
std::unique_ptr< RooAbsArg > compileForNormSet(RooArgSet const &normSet, RooFit::Detail::CompileContext &ctx) const override
 
RooProjectedPdf()
Default constructor.
 
const RooAbsReal * getProjection(const RooArgSet *iset, const RooArgSet *nset, const char *rangeName, int &code) const
Retrieve object representing projection integral of input p.d.f over observables iset,...
 
RooSetProxy intobs
observables that p.d.f is integrated over
 
RooSetProxy deps
dependents of this p.d.f
 
Int_t getAnalyticalIntegralWN(RooArgSet &allVars, RooArgSet &analVars, const RooArgSet *normSet, const char *rangeName=nullptr) const override
Mark all requested variables as internally integrated.
 
const T & arg() const
Return reference to object held in proxy.
 
const char * GetName() const override
Returns name of object.