64  RooRealVar nTrial0D(
"nTrial0D",
"Number of trial samples for cat-only generation",100,0,1e9) ;
 
   65  RooRealVar nTrial1D(
"nTrial1D",
"Number of trial samples for 1-dim generation",1000,0,1e9) ;
 
   66  RooRealVar nTrial2D(
"nTrial2D",
"Number of trial samples for 2-dim generation",100000,0,1e9) ;
 
   67  RooRealVar nTrial3D(
"nTrial3D",
"Number of trial samples for N-dim generation",10000000,0,1e9) ;
 
  105         << 
" variables with accept-reject may not be accurate" << endl;
 
  112                         << 
") WARNING: performing accept/reject sampling on a p.d.f in "  
  113                         << 
_realSampleDim << 
" dimensions without prior knowledge on maximum value " 
  114                         << 
"of p.d.f. Determining maximum value by taking " << 
_minTrials  
  115                         << 
" trial samples. If p.d.f contains sharp peaks smaller than average " 
  116                         << 
"distance between trial sampling points these may be missed and p.d.f. " 
  117                         << 
"may be sampled incorrectly." << endl ;
 
  127            << 
_realSampleDim << 
"-dimensional accept/reject sampling, this may take some time" << endl ;
 
  133            << 
"  Initializing accept-reject generator for" << endl << 
"    ";
 
  136      ccoutI(
Generation) << 
"  Function maximum provided, no trial sampling performed" << endl ;
 
  183  if(event->getSize() == 1) 
return event;
 
  196   coutI(
Generation) << 
"RooAcceptReject::generateEvent: resetting event cache" << endl ;
 
  207   cxcoutD(
Generation) << 
"RooAcceptReject::generateEvent maxFuncVal has changed, need to resample already accepted events by factor"  
  220   coutE(
Generation) << 
"RooAcceptReject::generateEvent: cannot estimate efficiency...giving up" << endl;
 
  226      cxcoutD(
Generation) << 
"RooAcceptReject::generateEvent: adding " << extra << 
" events to the cache, eff = " << eff << endl;
 
  231     cxcoutD(
Generation) << 
"RooAcceptReject::generateEvent: estimated function maximum increased from " 
  283      cerr << 
"RooAcceptReject: accepted event (used " << 
_eventsUsed << 
" of " 
  325    cerr << 
"RooAcceptReject: generated " << 
_totalEvents << 
" events so far." << endl ;
 
  342      coutI(
Generation) << 
"RooAcceptReject::getFuncMax: resetting event cache" << endl ;
 
virtual void randomize(const char *rangeName=0)
Randomize current value.
RooAbsCategory is the common abstract base class for objects that represent a discrete value with a f...
Int_t numTypes(const char *=0) const
Return number of types defined (in range named rangeName if rangeName!=0)
TIterator * createIterator(Bool_t dir=kIterForward) const R__SUGGEST_ALTERNATIVE("begin()
TIterator-style iteration over contained elements.
virtual Int_t numEntries() const
Class RooAbsNumGenerator is the abstract base class for MC event generator implementations like RooAc...
const RooAbsReal * _funcMaxVal
virtual void randomize(const char *rangeName=0)
Set a new value sampled from a uniform distribution over the fit range.
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Double_t getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
Class RooAcceptReject is a generic toy monte carlo generator implement the accept/reject sampling tec...
UInt_t _minTrialsArray[4]
virtual ~RooAcceptReject()
Destructor.
static void registerSampler(RooNumGenFactory &fact)
Register RooIntegrator1D, is parameters and capabilities with RooNumIntFactory.
const RooArgSet * generateEvent(UInt_t remaining, Double_t &resampleRatio)
Return a pointer to a generated event.
const RooArgSet * nextAcceptedEvent()
Scan through events in the cache which have not been used yet, looking for the first accepted one whi...
void addEventToCache()
Add a trial event to our cache and update our estimates of the function maximum value and integral.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Double_t getRealValue(const char *name, Double_t defVal=0, Bool_t verbose=kFALSE) const
Get value of a RooAbsReal stored in set with given name.
RooCategory represents a fundamental (non-derived) discrete value object.
virtual const RooArgSet * get(Int_t index) const override
Return RooArgSet with coordinates of event 'index'.
RooNumGenConfig holds the configuration parameters of the various numeric integrators used by RooReal...
const RooArgSet & getConfigSection(const char *name) const
Retrieve configuration information specific to integrator with given name.
RooNumGenFactory is a factory to instantiate numeric integrators from a given function binding and a ...
Bool_t storeProtoSampler(RooAbsNumGenerator *proto, const RooArgSet &defConfig)
Method accepting registration of a prototype numeric integrator along with a RooArgSet of its default...
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)
RooRealVar represents a variable that can be changed from the outside.
virtual void setVal(Double_t value)
Set value of variable to 'value'.
Iterator abstract base class.
virtual TObject * Next()=0
virtual const char * ClassName() const
Returns name of class to which the object belongs.