37using std::endl, std::ostream;
50 cxcoutI(Generation) <<
"RooProdGenContext::ctor() setting up event special generator context for product p.d.f. " << model.GetName()
51 <<
" for generation of observable(s) " << vars ;
59 deps.
remove(*std::unique_ptr<RooArgSet>{model.getObservables(*
prototype->get())},
true,
true) ;
67 cxcoutD(Generation) <<
"RooProdGenContext::ctor() factorizing product expression in irriducible terms " ;
101 cxcoutD(Generation) <<
"RooProdGenContext::ctor() analyzing product term " << *
term <<
" with observable(s) " << *
termDeps ;
103 ccxcoutD(Generation) <<
" which has dependence of external observable(s) " << *
impDeps <<
" that to be generated first by other terms" ;
113 cxcoutD(Generation) <<
"RooProdGenContext::ctor() no convergence in single term analysis loop, terminating loop and process remainder of terms as single unit " << std::endl ;
117 cxcoutD(Generation) <<
"RooProdGenContext::ctor() skipping this term for now because it needs imported dependents that are not generated yet" << std::endl ;
127 cxcoutD(Generation) <<
"RooProdGenContext::ctor() term has no observables requested to be generated, removing it" << std::endl ;
145 if (
term->size()==1) {
148 auto pdf =
static_cast<RooAbsPdf*
>((*term)[0]);
151 coutI(Generation) <<
"RooProdGenContext::ctor() creating subcontext for generation of observables " << *
pdfDep <<
" from model " << pdf->GetName() << std::endl ;
192 coutI(Generation) <<
"RooProdGenContext()::ctor creating subcontext for generation of observables " << *
termDeps
193 <<
"for irriducuble composite term using sub-product object " <<
multiPdf->GetName() ;
221 cxcoutD(Generation) <<
"RooProdGenContext::ctor() there are left-over terms that need to be generated separately" << std::endl ;
264 cxcoutD(Generation) <<
"RooProdGenContext(" << model.GetName() <<
"): creating context for irreducible composite trailer term "
276 coutI(Generation) <<
"RooProdGenContext(" << model.GetName() <<
"): generating uniform distribution for non-dependent observable(s) " <<
_uniObs << std::endl;
362 os <<
indent <<
"--- RooProdGenContext ---" << std::endl ;
363 os <<
indent <<
"Using PDF ";
365 os <<
indent <<
"List of component generators" << std::endl ;
static void indent(ostringstream &buf, int indent_level)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
const_iterator begin() const
const_iterator end() const
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.
virtual bool addOwned(RooAbsArg &var, bool silent=false)
Add an argument and transfer the ownership to the collection.
Abstract base class for generator contexts of RooAbsPdf objects.
void printMultiline(std::ostream &os, Int_t contents, bool verbose=false, TString indent="") const override
Interface for multi-line printing.
virtual void setProtoDataOrder(Int_t *lut)
Set the traversal order of prototype data to that in the lookup tables passed as argument.
Abstract interface for all probability density functions.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Container class to hold unbinned data.
Collection class for internal use, storing a collection of RooAbsArg pointers in a doubly linked list...
std::list< std::unique_ptr< RooAbsGenContext > > _gcList
List of component generator contexts.
void setProtoDataOrder(Int_t *lut) override
Set the traversal order of the prototype dataset by the given lookup table.
void attach(const RooArgSet ¶ms) override
Attach generator to given event buffer.
RooArgSet _ownedMultiProds
Owned auxiliary multi-term product PDFs.
const RooProdPdf * _pdf
Original PDF.
void initGenerator(const RooArgSet &theEvent) override
One-time initialization of generator context, forward to component generators.
RooArgSet _uniObs
Observable to be generated with flat distribution.
~RooProdGenContext() override
Destructor. Delete all owned subgenerator contexts.
void generateEvent(RooArgSet &theEvent, Int_t remaining) override
Generate a single event of the product by generating the components of the products sequentially.
RooProdGenContext(const RooProdPdf &model, const RooArgSet &vars, const RooDataSet *prototype=nullptr, const RooArgSet *auxProto=nullptr, bool _verbose=false)
void printMultiline(std::ostream &os, Int_t content, bool verbose=false, TString indent="") const override
Detailed printing interface.
Efficient implementation of a product of PDFs of the form.
TObject * Clone(const char *newname="") const override
Make a clone of an object using the Streamer facility.
RooCmdArg Conditional(const RooArgSet &pdfSet, const RooArgSet &depSet, bool depsAreCond=false)