70 <<
" generate the index category" << endl ;
90 if (anyServer && !allServers) {
92 <<
" generate all components of a derived index category" << endl ;
103 oocoutE(
_pdf,
Generation) <<
"RooSimSplitGenContext::RooSimSplitGenContext(" <<
GetName() <<
"): All components of the simultaneous PDF "
104 <<
"must be extended PDFs. Otherwise, it is impossible to calculate the number of events to be generated per component." << endl ;
148 oocoutE(
_pdf,
Generation) <<
"RooSimSplitGenContext::RooSimSplitGenContext(" <<
GetName() <<
") Couldn't deep-clone index category, abort," << endl ;
149 throw std::string(
"RooSimSplitGenContext::RooSimSplitGenContext() Couldn't deep-clone index category, abort") ;
164 for (vector<RooAbsGenContext*>::iterator iter =
_gcList.begin() ; iter!=
_gcList.end() ; ++iter) {
182 for (vector<RooAbsGenContext*>::iterator iter =
_gcList.begin() ; iter!=
_gcList.end() ; ++iter) {
183 (*iter)->attach(args) ;
202 for (vector<RooAbsGenContext*>::iterator iter =
_gcList.begin() ; iter!=
_gcList.end() ; ++iter) {
203 (*iter)->initGenerator(theEvent) ;
225 << nEvents <<
" events" << endl;
236 vector<Double_t> nGen(
_numPdf) ;
264 while (nGenSoFar<nEvents) {
281 map<string,RooAbsData*> dataMap ;
288 dataMap[proxy->
GetName()] =
_gcList[icomp]->generate(nGen[icomp],skipInit,extendedMode) ;
306 for (vector<RooAbsGenContext*>::iterator iter=
_gcList.begin() ; iter!=
_gcList.end() ; ++iter) {
307 (*iter)->setExpectedData(flag) ;
349 os <<
indent <<
"--- RooSimSplitGenContext ---" << endl ;
350 os <<
indent <<
"Using PDF ";
static void indent(ostringstream &buf, int indent_level)
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
RooArgSet * getObservables(const RooArgSet &set, Bool_t valueOnly=kTRUE) const
Return the observables of this pdf given a set of observables.
virtual Bool_t isDerived() const
Does value or shape of this arg depend on any other arg?
TIterator * serverIterator() const R__SUGGEST_ALTERNATIVE("Use servers() and begin()
Bool_t recursiveRedirectServers(const RooAbsCollection &newServerList, Bool_t mustReplaceAll=kFALSE, Bool_t nameChange=kFALSE, Bool_t recurseInNewSet=kTRUE)
RooAbsCategoryLValue is the common abstract base class for objects that represent a discrete value th...
RooAbsCategory is the common abstract base class for objects that represent a discrete value with a f...
const RooCatType * lookupType(Int_t index, Bool_t printError=kFALSE) const
Find our type corresponding to the specified index, or return 0 for no match.
virtual Bool_t remove(const RooAbsArg &var, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE)
Remove the specified argument from our list.
RooAbsArg * find(const char *name) const
Find object with given name in list.
RooAbsGenContext is the abstract base class for generator contexts of RooAbsPdf objects.
virtual void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Interface for multi-line printing.
virtual void Print(Option_t *options=0) const
Print TNamed name and title.
Bool_t canBeExtended() const
virtual RooAbsGenContext * autoGenContext(const RooArgSet &vars, const RooDataSet *prototype=0, const RooArgSet *auxProto=0, Bool_t verbose=kFALSE, Bool_t autoBinned=kTRUE, const char *binnedTag="") const
virtual Double_t expectedEvents(const RooArgSet *nset) const
Return expected number of events from this p.d.f for use in extended likelihood calculations.
virtual const char * name() const
RooAbsArg * absArg() const
RooArgSet is a container object that can hold multiple RooAbsArg objects.
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...
RooCatType is an auxilary class for RooAbsCategory and defines a a single category state.
const RooAbsCategory & arg() const
RooCategory represents a fundamental (non-derived) discrete value object.
RooDataSet is a container class to hold unbinned data.
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,...
static Double_t uniform(TRandom *generator=randomGenerator())
Return a number uniformly distributed from (0,1)
RooSimSplitGenContext is an efficient implementation of the generator context specific for RooSimulta...
virtual void attach(const RooArgSet ¶ms)
Attach the index category clone to the given event buffer.
std::vector< RooAbsGenContext * > _gcList
virtual RooDataSet * generate(Double_t nEvents=0, Bool_t skipInit=kFALSE, Bool_t extendedMode=kFALSE)
Generate the specified number of events with nEvents>0 and and return a dataset containing the genera...
virtual void initGenerator(const RooArgSet &theEvent)
Perform one-time initialization of generator context.
virtual void generateEvent(RooArgSet &theEvent, Int_t remaining)
this method is empty because it is not used in this type of context
virtual void printMultiline(std::ostream &os, Int_t content, Bool_t verbose=kFALSE, TString indent="") const
Detailed printing interface.
virtual void setProtoDataOrder(Int_t *lut)
this method is empty because proto datasets are not supported by this context
RooSimSplitGenContext(const RooSimultaneous &model, const RooArgSet &vars, Bool_t _verbose=kFALSE, Bool_t autoBinned=kTRUE, const char *binnedTag="")
Constructor of specialized generator context for RooSimultaneous p.d.f.s.
const RooSimultaneous * _pdf
std::vector< int > _gcIndex
RooDataSet * createDataSet(const char *name, const char *title, const RooArgSet &obs)
this method is empty because it is not used by this context
virtual ~RooSimSplitGenContext()
Destructor. Delete all owned subgenerator contexts.
RooAbsCategoryLValue * _idxCat
virtual void setExpectedData(Bool_t)
Forward to components.
RooSimultaneous facilitates simultaneous fitting of multiple PDFs to subsets of a given dataset.
RooCategoryProxy _indexCat
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
Iterator abstract base class.
virtual TObject * Next()=0
virtual TIterator * MakeIterator(Bool_t dir=kIterForward) const
Return a list iterator.
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual const char * GetName() const
Returns name of object.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
RooCmdArg Index(RooCategory &icat)
RooCmdArg Link(const char *state, RooAbsData &data)