58 cxcoutI(
Generation) <<
"RooAddGenContext::ctor() setting up event special generator context for sum p.d.f. " << model.
GetName()
59 <<
" for generation of observable(s) " << vars ;
73 coefNSet.
add(*prototype->
get()) ;
105 cxcoutI(
Generation) <<
"RooAddGenContext::ctor() setting up event special generator context for sum resolution model " << model.
GetName()
106 <<
" for generation of observable(s) " << vars ;
142 for (vector<RooAbsGenContext*>::iterator iter=
_gcList.begin() ; iter!=
_gcList.end() ; ++iter) {
159 for (vector<RooAbsGenContext*>::iterator iter=
_gcList.begin() ; iter!=
_gcList.end() ; ++iter) {
160 (*iter)->attach(args) ;
184 for (vector<RooAbsGenContext*>::iterator iter=
_gcList.begin() ; iter!=
_gcList.end() ; ++iter) {
185 (*iter)->initGenerator(theEvent) ;
200 for (i=0 ; i<
_nComp ; i++) {
202 _gcList[i]->generateEvent(theEvent,remaining) ;
222 for (i=0 ; i<
_nComp ; i++) {
235 for (i=0 ; i<
_nComp ; i++) {
252 for (vector<RooAbsGenContext*>::iterator iter=
_gcList.begin() ; iter!=
_gcList.end() ; ++iter) {
253 (*iter)->setProtoDataOrder(lut) ;
265 os << indent <<
"--- RooAddGenContext ---" << endl ;
266 os << indent <<
"Using PDF ";
269 os << indent <<
"List of component generators" << endl ;
272 for (vector<RooAbsGenContext*>::const_iterator iter=
_gcList.begin() ; iter!=
_gcList.end() ; ++iter) {
273 (*iter)->printMultiline(os,content,verbose,indent2) ;
RooAddPdf is an efficient implementation of a sum of PDFs of the form.
RooAbsCollection * snapshot(Bool_t deepCopy=kTRUE) const
Take a snap shot of current collection contents: An owning collection is returned containing clones o...
TIterator * _pdfIter
List of supplemental normalization factors.
void updateCoefficients(CacheElem &cache, const RooArgSet *nset) const
Update the coefficient values in the given cache element: calculate new remainder fraction...
virtual void printStream(std::ostream &os, Int_t contents, StyleOption style, TString indent="") const
Print description of object on ostream, printing contents set by contents integer, which is interpreted as an OR of 'enum ContentsOptions' values and in the style given by 'enum StyleOption'.
virtual void generateEvent(RooArgSet &theEvent, Int_t remaining)
Randomly choose one of the component contexts to generate this event, with a probability proportional...
virtual void attach(const RooArgSet ¶ms)
Attach given set of variables to internal p.d.f. clone.
RooListProxy _pdfList
Registry of component analytical integration codes.
virtual ~RooAddGenContext()
Destructor. Delete all owned subgenerator contexts.
CacheElem * getProjCache(const RooArgSet *nset, const RooArgSet *iset=0, const char *rangeName=0) const
Retrieve cache element with for calculation of p.d.f value with normalization set nset and integrated...
RooAddPdf::CacheElem * _pcache
RooAddModel cache element.
virtual void setProtoDataOrder(Int_t *lut)
Forward the setProtoDataOrder call to the component generator contexts.
CacheElem * getProjCache(const RooArgSet *nset, const RooArgSet *iset=0, const char *rangeName=0) const
Retrieve cache element with for calculation of p.d.f value with normalization set nset and integrated...
virtual void printMultiline(std::ostream &os, Int_t content, Bool_t verbose=kFALSE, TString indent="") const
Print the details of the context.
TString & Append(const char *cs)
TIterator * _pdfIter
List of supplemental normalization factors.
RooAbsGenContext is the abstract base class for generator contexts of RooAbsPdf objects.
RooListProxy _pdfList
Registry of component analytical integration codes.
RooAddGenContext(const RooAddPdf &model, const RooArgSet &vars, const RooDataSet *prototype=0, const RooArgSet *auxProto=0, Bool_t _verbose=kFALSE)
Constructor.
virtual void initGenerator(const RooArgSet &theEvent)
One-time initialization of generator contex.
void updateThresholds()
Update the cumulative threshold table from the current coefficient values.
RooAbsArg * find(const char *name) const
Find object with given name in list.
virtual const char * GetName() const
Returns name of object.
static void indent(ostringstream &buf, int indent_level)
RooDataSet is a container class to hold unbinned data.
static Double_t uniform(TRandom *generator=randomGenerator())
Return a number uniformly distributed from (0,1)
virtual void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
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.
RooAddModel::CacheElem * _mcache
void updateCoefficients(CacheElem &cache, const RooArgSet *nset) const
Update the coefficient values in the given cache element: calculate new remainder fraction...
RooAbsPdf is the abstract interface for all probability density functions The class provides hybrid a...
virtual TObject * Next()=0
RooAddGenContext is an efficient implementation of the generator context specific for RooAddPdf PDFs...
void setOperMode(OperMode mode, Bool_t recurseADirty=kTRUE)
Change cache operation mode to given mode.
virtual void fixAddCoefNormalization(const RooArgSet &addNormSet=RooArgSet(), Bool_t force=kTRUE)
Fix the interpretation of the coefficient of any RooAddPdf component in the expression tree headed by...
Bool_t recursiveRedirectServers(const RooAbsCollection &newServerList, Bool_t mustReplaceAll=kFALSE, Bool_t nameChange=kFALSE, Bool_t recurseInNewSet=kTRUE)
std::vector< RooAbsGenContext * > _gcList
virtual const RooArgSet * get(Int_t index) const
Return RooArgSet with coordinates of event 'index'.
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add element to non-owning set.
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.