54 cxcoutI(
Generation) <<
"RooBinnedGenContext::ctor() setting up event special generator context for sum p.d.f. " << model.
GetName()
55 <<
" for generation of observable(s) " << vars ;
69 coefNSet.
add(*prototype->
get()) ;
79 while((var=viter.
next())) {
149 <<
") ERROR: No event count provided and p.d.f does not provide expected number of events" << endl ;
172 Int_t histOutSum(0) ;
181 }
else if (extended) {
195 histOutSum += histOut[i] ;
205 Int_t nEvtExtra = abs(
Int_t(nEvents)-histOutSum) ;
206 Int_t wgt = (histOutSum>nEvents) ? -1 : 1 ;
215 if (ranY<_hist->weight()) {
217 histOut[ibinRand]++ ;
220 if (histOut[ibinRand]>0) {
221 histOut[ibinRand]-- ;
260 os <<
indent <<
"--- RooBinnedGenContext ---" << endl ;
261 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.
void setOperMode(OperMode mode, Bool_t recurseADirty=kTRUE)
Change cache operation mode to given mode.
Bool_t recursiveRedirectServers(const RooAbsCollection &newServerList, Bool_t mustReplaceAll=kFALSE, Bool_t nameChange=kFALSE, Bool_t recurseInNewSet=kTRUE)
RooFIter fwdIterator() const R__SUGGEST_ALTERNATIVE("begin()
One-time forward iterator.
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.
Bool_t canBeExtended() 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 Double_t getMax(const char *name=0) const
Get maximum of currently defined range.
virtual Double_t getMin(const char *name=0) const
Get miniminum of currently defined range.
virtual std::list< Double_t > * binBoundaries(RooAbsRealLValue &, Double_t, Double_t) const
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...
RooDataHist * fillDataHist(RooDataHist *hist, const RooArgSet *nset, Double_t scaleFactor, Bool_t correctForBinVolume=kFALSE, Bool_t showProgress=kFALSE) const
Fill a RooDataHist with values sampled from this function at the bin centers.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
RooArgSet * snapshot(bool deepCopy=true) const
Use RooAbsCollection::snapshot(), but return as RooArgSet.
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...
RooBinnedGenContext is an efficient implementation of the generator context specific for binned pdfs.
RooBinnedGenContext(const RooAbsPdf &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.
virtual void attach(const RooArgSet ¶ms)
Attach given set of variables to internal p.d.f. clone.
virtual void generateEvent(RooArgSet &theEvent, Int_t remaining)
this method is not implemented for this context
virtual ~RooBinnedGenContext()
Destructor. Delete all owned subgenerator contexts.
virtual void setExpectedData(Bool_t)
virtual void printMultiline(std::ostream &os, Int_t content, Bool_t verbose=kFALSE, TString indent="") const
Print the details of the context.
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...
The RooDataHist is a container class to hold N-dimensional binned data.
virtual void reset()
Reset all bin weights to zero.
virtual Double_t weight() const
virtual Int_t numEntries() const
Return the number of bins.
virtual const RooArgSet * get() const
RooDataSet is a container class to hold unbinned data.
virtual const RooArgSet * get(Int_t index) const
Return RooArgSet with coordinates of event 'index'.
virtual void add(const RooArgSet &row, Double_t weight=1.0, Double_t weightError=0)
Add a data point, with its coordinates specified in the 'data' argset, to the data set.
A one-time forward iterator working on RooLinkedList or RooAbsCollection.
RooAbsArg * next()
Return next element or nullptr if at end.
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 TRandom * randomGenerator()
Return a pointer to a singleton random-number generator implementation.
RooRealVar represents a fundamental (non-derived) real valued object.
virtual const char * GetName() const
Returns name of object.
virtual Int_t Poisson(Double_t mean)
Generates a random integer N according to a Poisson law.
virtual Double_t Uniform(Double_t x1=1)
Returns a uniform deviate on the interval (0, x1).
virtual UInt_t Integer(UInt_t imax)
Returns a random integer uniformly distributed on the interval [ 0, imax-1 ].
RooCmdArg WeightVar(const char *name, Bool_t reinterpretAsWeight=kFALSE)