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 ";
virtual Double_t getMin(const char *name=0) const
virtual const char * GetName() const
Returns name of object.
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 Double_t getMax(const char *name=0) const
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...
virtual const RooArgSet * get() const
RooArgSet * getObservables(const RooArgSet &set, Bool_t valueOnly=kTRUE) const
virtual std::list< Double_t > * binBoundaries(RooAbsRealLValue &, Double_t, Double_t) const
virtual ~RooBinnedGenContext()
Destructor. Delete all owned subgenerator contexts.
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.
virtual void attach(const RooArgSet ¶ms)
Attach given set of variables to internal p.d.f. clone.
RooDataSet is a container class to hold N-dimensional binned data.
virtual UInt_t Integer(UInt_t imax)
Returns a random integer on [ 0, imax-1 ].
static TRandom * randomGenerator()
Return a pointer to a singleton random-number generator implementation.
virtual Double_t weight() const
RooAbsGenContext is the abstract base class for generator contexts of RooAbsPdf objects.
virtual Double_t expectedEvents(const RooArgSet *nset) const
Return expected number of events from this p.d.f for use in extended likelihood calculations.
RooRealVar represents a fundamental (non-derived) real valued object.
RooAbsCollection * snapshot(Bool_t deepCopy=kTRUE) const
Take a snap shot of current collection contents: An owning collection is returned containing clones o...
virtual void initGenerator(const RooArgSet &theEvent)
One-time initialization of generator contex.
RooDataSet is a container class to hold unbinned data.
Bool_t canBeExtended() const
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...
RooAbsArg * find(const char *name) const
Find object with given name in list.
virtual Int_t numEntries() const
Return the number of bins.
RooFIter fwdIterator() const
virtual void printMultiline(std::ostream &os, Int_t content, Bool_t verbose=kFALSE, TString indent="") const
Print the details of the context.
RooCmdArg WeightVar(const char *name, Bool_t reinterpretAsWeight=kFALSE)
virtual void generateEvent(RooArgSet &theEvent, Int_t remaining)
this method is not implemented for this context
virtual Double_t Uniform(Double_t x1=1)
Returns a uniform deviate on the interval (0, x1).
virtual void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Interface for multi-line printing.
virtual void setExpectedData(Bool_t)
RooAbsPdf is the abstract interface for all probability density functions The class provides hybrid a...
virtual void reset()
Reset all bin weights to zero.
void setOperMode(OperMode mode, Bool_t recurseADirty=kTRUE)
Change cache operation mode to given mode.
RooBinnedGenContext(const RooAbsPdf &model, const RooArgSet &vars, const RooDataSet *prototype=0, const RooArgSet *auxProto=0, Bool_t _verbose=kFALSE)
Constructor.
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...
virtual Int_t Poisson(Double_t mean)
Generates a random integer N according to a Poisson law.
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
Bool_t recursiveRedirectServers(const RooAbsCollection &newServerList, Bool_t mustReplaceAll=kFALSE, Bool_t nameChange=kFALSE, Bool_t recurseInNewSet=kTRUE)
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...
RooBinnedGenContext is an efficient implementation of the generator context specific for binned pdfs...