94 <<
" variables with accept-reject may not be accurate" << std::endl;
100 oocoutW(
nullptr, Generation) <<
"RooAcceptReject::ctor(" <<
_funcClone->GetName()
101 <<
") WARNING: performing accept/reject sampling on a p.d.f in "
102 <<
_realSampleDim <<
" dimensions without prior knowledge on maximum value "
103 <<
"of p.d.f. Determining maximum value by taking " <<
_minTrials
104 <<
" trial samples. If p.d.f contains sharp peaks smaller than average "
105 <<
"distance between trial sampling points these may be missed and p.d.f. "
106 <<
"may be sampled incorrectly." << std::endl ;
115 oocoutW(
nullptr, Generation) <<
"RooAcceptReject::ctor(" << func.
GetName() <<
"): WARNING: " <<
_minTrials <<
" trial samples requested by p.d.f for "
116 <<
_realSampleDim <<
"-dimensional accept/reject sampling, this may take some time" << std::endl ;
121 oocoutI(
nullptr, Generation) << func.
GetName() <<
"::RooAcceptReject" <<
":" << std::endl
122 <<
" Initializing accept-reject generator for" << std::endl <<
" ";
125 ooccoutI(
nullptr, Generation) <<
" Function maximum provided, no trial sampling performed" << std::endl ;
129 ooccoutI(
nullptr, Generation) <<
" Min sampling trials is " <<
_minTrials << std::endl;
132 ooccoutI(
nullptr, Generation) <<
" Will generate category vars "<<
_catVars << std::endl ;
135 ooccoutI(
nullptr, Generation) <<
" Will generate real vars " <<
_realVars << std::endl ;
156 if(event->size() == 1)
return event;
168 if (_cache->numEntries()>1000000) {
169 oocoutI(
nullptr, Generation) <<
"RooAcceptReject::generateEvent: resetting event cache" << std::endl;
177 while(
nullptr == event) {
180 oocxcoutD(
nullptr, Generation) <<
"RooAcceptReject::generateEvent maxFuncVal has changed, need to resample already accepted events by factor"
193 oocoutE(
nullptr, Generation) <<
"RooAcceptReject::generateEvent: cannot estimate efficiency...giving up" << std::endl;
199 oocxcoutD(
nullptr, Generation) <<
"RooAcceptReject::generateEvent: adding " << extra <<
" events to the cache, eff = " << eff << std::endl;
204 oocxcoutD(
nullptr, Generation) <<
"RooAcceptReject::generateEvent: estimated function maximum increased from "
224 while(
nullptr==event) {
242const RooArgSet *RooAcceptReject::nextAcceptedEvent()
256 std::cerr <<
"RooAcceptReject: accepted event (used " <<
_eventsUsed <<
" of "
257 << _cache->numEntries() <<
" so far)" << std::endl;
271void RooAcceptReject::addEventToCache()
294 std::cerr <<
"RooAcceptReject: generated " <<
_totalEvents <<
" events so far." << std::endl ;
299double RooAcceptReject::getFuncMax()
310 if (_cache->numEntries()>1000000) {
311 oocoutI(
nullptr, Generation) <<
"RooAcceptReject::getFuncMax: resetting event cache" << std::endl ;
320std::string
const& RooAcceptReject::generatorName()
const {
321 static const std::string
name =
"RooAcceptReject";
ROOT::RRangeCast< T, false, Range_t > static_range_cast(Range_t &&coll)
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
A space to attach TBranches.
Storage_t const & get() const
Const access to the underlying stl container.
Abstract base class for objects that represent a real value and implements functionality common to al...
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Object to represent discrete states.
Holds the configuration parameters of the various numeric integrators used by RooRealIntegral.
const RooArgSet & getConfigSection(const char *name) const
Retrieve configuration information specific to integrator with given name.
static double uniform(TRandom *generator=randomGenerator())
Return a number uniformly distributed from (0,1)
Variable that can be changed from the outside.
const char * GetName() const override
Returns name of object.