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 ;
270 TString indent2(indent) ;
271 indent2.Append(
" ") ;
272 for (vector<RooAbsGenContext*>::const_iterator iter=
_gcList.begin() ; iter!=
_gcList.end() ; ++iter) {
273 (*iter)->printMultiline(os,content,verbose,indent2) ;
virtual const char * GetName() const
Returns name of object.
void updateCoefficients(CacheElem &cache, const RooArgSet *nset) const
Update the coefficient values in the given cache element: calculate new remainder fraction...
RooAddPdf is an efficient implementation of a sum of PDFs of the form.
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 Bool_t add(const RooAbsCollection &col, Bool_t silent=kFALSE)
Add a collection of arguments to this collection by calling add() for each element in the source coll...
TIterator * _pdfIter
List of supplemental normalization factors.
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.
void updateCoefficients(CacheElem &cache, const RooArgSet *nset) const
Update the coefficient values in the given cache element: calculate new remainder fraction...
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.
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...
void updateThresholds()
Update the cumulative threshold table from the current coefficient values.
virtual void printMultiline(std::ostream &os, Int_t content, Bool_t verbose=kFALSE, TString indent="") const
Print the details of the context.
RooAbsCollection * snapshot(Bool_t deepCopy=kTRUE) const
Take a snap shot of current collection contents: An owning collection is returned containing clones o...
static void indent(ostringstream &buf, int indent_level)
RooDataSet is a container class to hold unbinned data.
virtual const RooArgSet * get(Int_t index) const
Return RooArgSet with coordinates of event 'index'.
static Double_t uniform(TRandom *generator=randomGenerator())
Return a number uniformly distributed from (0,1)
RooAbsArg * find(const char *name) const
Find object with given name in list.
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.
virtual void setProtoDataOrder(Int_t *lut)
Set the traversal order of prototype data to that in the lookup tables passed as argument.
virtual void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Interface for multi-line printing.
RooAddModel::CacheElem * _mcache
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