188   if (std::abs(
prob) > 1
e6) {
 
  190                            << 
") WARNING: top-level pdf has a large value: " << 
prob << std::endl;
 
  194      caller->logEvalError(
"getLogVal() top-level p.d.f evaluates to a negative number");
 
  199      caller->logEvalError(
"getLogVal() top-level p.d.f evaluates to zero");
 
  201      return -std::numeric_limits<double>::infinity();
 
  205      caller->logEvalError(
"getLogVal() top-level p.d.f evaluates to NaN");
 
  210   return std::log(
prob);
 
  215using std::endl, std::string, std::ostream, std::vector, std::pair, std::make_pair;
 
  262  _normMgr(
other._normMgr,
this), _selectComp(
other._selectComp), _normRange(
other._normRange)
 
  267  if (
other._specGeneratorConfig) {
 
 
  286      const std::string 
msg = 
"p.d.f normalization integral is zero or negative: " + std::to_string(
normVal);
 
 
  398  if(!error) 
return error ;
 
 
  421  if (!nset) 
return 1 ;
 
  429      coutW(Eval) << 
"RooAbsPdf::getNorm(" << 
GetName() << 
":: WARNING normalization is zero, nset = " ;  nset->
Print(
"1") ;
 
  430      if(
_errorCount == 10) 
coutW(Eval) << 
"RooAbsPdf::getNorm(" << 
GetName() << 
") INFO: no more messages will be printed " << endl ;
 
 
  448    return cache->
_norm ;
 
 
  519      << 
") recreating normalization integral " << endl ;
 
  522      cxcoutD(Tracing) << 
ClassName() << 
"::syncNormalization(" << 
GetName() << 
") selfNormalized, creating unit norm" << endl;
 
  556          << 
"-dim value cache for integral over " << 
depList << 
" as a function of " << 
cacheParams << 
" in range " << (
nr?
nr:
"<default>") <<  endl ;
 
 
  608      if (pdf) pdf->setTraceCounter(
value,
false) ;
 
 
  639  for (
double val : 
inputs) { 
 
  640    inf |= !std::isfinite(val);
 
  656  for (
unsigned int i=0; i<
outputs.size(); ++i) {
 
  661    } 
else if (!std::isfinite(
outputs[i])){
 
  665      logEvalError(
Form(
"p.d.f value of (%s) is less than zero (%f) for entry %zu",
 
 
  673  for (std::size_t i = 0; i < 
pdfValues.size(); ++i) {
 
 
  735    coutE(InputArguments) << 
GetName() << 
": this PDF does not support extended maximum likelihood" 
  743    logEvalError(
"extendedTerm #expected events is <0 return a  NaN");
 
  749  if (std::abs(
expected)<1
e-10 && std::abs(sumEntries)<1
e-10) {
 
  755    logEvalError(
"extendedTerm #expected events is a NaN") ;
 
  760      ? (
expected - sumEntries) - sumEntries * (std::log(
expected) - std::log(sumEntries))
 
  763  if(sumEntriesW2 != 0.0) {
 
  764    extra *= sumEntriesW2 / sumEntries;
 
 
  944   return RooFit::FitHelpers::createNLL(*
this, 
data, 
cmdList);
 
 
 1075   return RooFit::FitHelpers::fitTo(*
this, 
data, 
cmdList, 
false);
 
 
 1104  os << 
indent << 
"--- RooAbsPdf ---" << endl;
 
 1107    os << 
indent << 
" Normalization integral: " << endl ;
 
 
 1148    context= 
genContext(vars,
nullptr,
nullptr,verbose);
 
 
 1218  pc.
defineInt(
"randProto",
"PrototypeData",0,0) ;
 
 1219  pc.
defineInt(
"resampleProto",
"PrototypeData",1,0) ;
 
 1221  pc.
defineInt(
"extended",
"Extended",0,0) ;
 
 1222  pc.
defineInt(
"nEvents",
"NumEvents",0,0) ;
 
 1223  pc.
defineInt(
"autoBinned",
"AutoBinned",0,1) ;
 
 1224  pc.
defineInt(
"expectedData",
"ExpectedData",0,0) ;
 
 1239  bool verbose = pc.
getInt(
"verbose") ;
 
 1240  bool randProto = pc.
getInt(
"randProto") ;
 
 1259  } 
else if (nEvents==0) {
 
 1260    cxcoutI(Generation) << 
"No number of events specified , number of events generated is " 
 1265    cxcoutI(Generation) << 
"WARNING Using generator option Extended() (Poisson distribution of #events) together " 
 1266           << 
"with a prototype dataset implies incomplete sampling or oversampling of proto data. " 
 1267           << 
"Set randomize flag in ProtoData() option to randomize prototype dataset order and thus " 
 1268           << 
"to randomize the set of over/undersampled prototype events for each generation cycle." << endl ;
 
 1273  std::unique_ptr<RooDataSet> 
data;
 
 
 1310  pc.
defineInt(
"randProto",
"PrototypeData",0,0) ;
 
 1311  pc.
defineInt(
"resampleProto",
"PrototypeData",1,0) ;
 
 1313  pc.
defineInt(
"extended",
"Extended",0,0) ;
 
 1314  pc.
defineInt(
"nEvents",
"NumEvents",0,0) ;
 
 1315  pc.
defineInt(
"autoBinned",
"AutoBinned",0,1) ;
 
 1330  bool verbose = pc.
getInt(
"verbose") ;
 
 1331  bool randProto = pc.
getInt(
"randProto") ;
 
 
 1395    context->setExpectedData(
true) ;
 
 1399  if(
nullptr != context && context->isValid()) {
 
 1400     generated = std::unique_ptr<RooDataSet>{context->generate(nEvents, 
false, 
extended)};
 
 1403    coutE(Generation)  << 
"RooAbsPdf::generate(" << 
GetName() << 
") cannot create a valid context" << endl;
 
 
 1419    return std::make_unique<RooDataSet>(
"emptyData",
"emptyData",
whatVars);
 
 1430    coutI(Generation) << 
"RooAbsPdf::generate (Re)randomizing event order in prototype dataset (Nevt=" << nEvents << 
")" << endl ;
 
 1440    coutE(Generation) << 
"RooAbsPdf::generate(" << 
GetName() << 
") do not have a valid generator context" << endl;
 
 
 1477  coutE(Generation) << 
"RooAbsPdf::generate(" << 
GetName() << 
") ERROR creating generator context" << endl ;
 
 
 1500    for (
int i = 
nProto-1; i > 0; --i) {
 
 
 1565    if(
server == &arg) 
continue;
 
 1566    if(
server->dependsOn(arg)) {
 
 
 1607  pc.
defineInt(
"extended",
"Extended",0,0) ;
 
 1608  pc.
defineInt(
"nEvents",
"NumEvents",0,0) ;
 
 1610  pc.
defineInt(
"expectedData",
"ExpectedData",0,0) ;
 
 1619  double nEvents = pc.
getDouble(
"nEventsD") ;
 
 1621    nEvents = pc.
getInt(
"nEvents") ;
 
 1631    cxcoutI(Generation) << 
" Extended mode active, number of events generated (" << nEvents << 
") is Poisson fluctuation on " 
 1632         << 
GetName() << 
"::expectedEvents() = " << nEvents << endl ;
 
 1637  } 
else if (nEvents==0) {
 
 1638    cxcoutI(Generation) << 
"No number of events specified , number of events generated is " 
 
 1684  auto hist = std::make_unique<RooDataHist>(
"genData",
"genData",
whatVars);
 
 1689      coutE(InputArguments) << 
"RooAbsPdf::generateBinned(" << 
GetName() << 
") ERROR: No event count provided and p.d.f does not provide expected number of events" << endl ;
 
 1708  for (
int i=0 ; i<hist->numEntries() ; i++) {
 
 1713      double w=hist->weight()*nEvents ;
 
 1714      hist->set(i, 
w, sqrt(
w));
 
 1720      hist->set(
w,sqrt(
w)) ;
 
 1744    std::size_t counter = 0;
 
 1768        coutP(Generation) << 
"RooAbsPdf::generateBinned(" << 
GetName() << 
") Performing costly accept/reject sampling. If this takes too long, use " 
 1769            << 
"extended mode to speed up the process." << std::endl;
 
 1774    for (
int i=0 ; i<hist->numEntries() ; i++) {
 
 1784    double corr = nEvents/hist->sumEntries() ;
 
 1785    for (
int i=0 ; i<hist->numEntries() ; i++) {
 
 1787      hist->set(hist->weight()*
corr,sqrt(hist->weight()*
corr)) ;
 
 
 1808  std::sort(ranges.begin(), ranges.end());
 
 1810  for (
auto it = ranges.begin(); it != ranges.end(); ++it) {
 
 1811    double& 
startL = it->first;
 
 1812    double& 
endL   = it->second;
 
 1826  auto newEnd = std::remove_if(ranges.begin(), ranges.end(),
 
 1827      [](
const std::pair<double,double>& 
input){
 
 1828          return input.first == input.second;
 
 1946      !
cmdList.FindObject(
"RangeWithName")) {
 
 1957    coutI(Plotting) << 
"RooAbsPdf::plotOn(" << 
GetName() << 
") p.d.f was fitted in a subrange and no explicit " 
 1959          << (
normRange2?
"NormRange()":
"") << 
" was specified. Plotting / normalising in fit range. To override, do one of the following" 
 1960          << 
"\n\t- Clear the automatic fit range attribute: <pdf>.removeStringAttribute(\"fitrange\");" 
 1961          << 
"\n\t- Explicitly specify the plotting range: Range(\"<rangeName>\")." 
 1962          << 
"\n\t- Explicitly specify where to compute the normalisation: NormRange(\"<rangeName>\")." 
 1963          << 
"\n\tThe default (full) range can be denoted with Range(\"\") / NormRange(\"\")."<< endl ;
 
 1973  pc.
defineSet(
"compSet",
"SelectCompSet",0) ;
 
 1980  pc.
defineInt(
"rangeAdjustNorm",
"Range",0,0) ;
 
 1981  pc.
defineInt(
"rangeWNAdjustNorm",
"RangeWithName",0,0) ;
 
 1982  pc.
defineMutex(
"SelectCompSet",
"SelectCompSpec") ;
 
 1994  double scaleFactor = pc.
getDouble(
"scaleFactor") ;
 
 2025            << 
"): ERROR the 'Expected' scale option can only be used on extendable PDFs" << endl ;
 
 2039      std::vector<pair<double,double> > 
rangeLim;
 
 2044        double rangeLo = pc.
getDouble(
"rangeLo") ;
 
 2045        double rangeHi = pc.
getDouble(
"rangeHi") ;
 
 2046        rangeLim.push_back(make_pair(rangeLo,rangeHi)) ;
 
 2050        coutI(Plotting) << 
"RooAbsPdf::plotOn(" << 
GetName() << 
") only plotting range [" 
 2051            << rangeLo << 
"," << rangeHi << 
"]" ;
 
 2053          ccoutI(Plotting) << 
", curve is normalized to data in " << (
adjustNorm?
"given":
"full") << 
" range" << endl ;
 
 2055          ccoutI(Plotting) << endl ;
 
 2074        coutI(Plotting) << 
"RooAbsPdf::plotOn(" << 
GetName() << 
") only plotting range '" << pc.
getString(
"rangeName", 
"", 
false) << 
"'" ;
 
 2076          ccoutI(Plotting) << 
", curve is normalized to data in " << (
adjustNorm?
"given":
"full") << 
" range" << endl ;
 
 2078          ccoutI(Plotting) << endl ;
 
 2097        coutI(Plotting) << 
"RooAbsPdf::plotOn(" << 
GetName() << 
") p.d.f. curve is normalized using explicit choice of ranges '" << pc.
getString(
"normRangeName", 
"", 
false) << 
"'" << endl ;
 
 2112          coutE(Plotting) << 
"Requested plot/integration ranges overlap. For correct plotting, new ranges " 
 2113              "will be defined." << std::endl;
 
 2118            std::stringstream rangeName;
 
 2119            rangeName << 
"Remove_overlap_range_" << it - 
rangeLim.
begin();
 
 2120            plotVar->setRange(rangeName.str().c_str(), it->first, it->second);
 
 2182      coutI(Plotting) << 
"RooAbsPdf::plotOn(" << 
GetName() << 
") directly selected PDF components: " << *
dirSelNodes << endl ;
 
 2188   coutE(Plotting) << 
"RooAbsPdf::plotOn(" << 
GetName() << 
") ERROR: component selection set " << *
compSet << 
" does not match any components of p.d.f." << endl ;
 
 2190   coutE(Plotting) << 
"RooAbsPdf::plotOn(" << 
GetName() << 
") ERROR: component selection expression '" << 
compSpec << 
"' does not select any components of p.d.f." << endl ;
 
 
 2233            << 
"): ERROR the 'Expected' scale option can only be used on extendable PDFs" << endl ;
 
 
 
 2303  pc.
defineInt(
"showc",
"ShowConstants",0,0) ;
 
 2304  pc.
defineSet(
"params",
"Parameters",0,
nullptr) ;
 
 2305  pc.
defineInt(
"dummy",
"FormatArgs",0,0) ;
 
 2315  const char* label = pc.
getString(
"label") ;
 
 2324    params = std::unique_ptr<RooArgSet>{params->selectCommon(*
requestedParams)};
 
 
 2352  for (
const auto param : params) {
 
 2363  if(!
box) 
return nullptr;
 
 2364  box->SetName((std::string(
GetName()) + 
"_paramBox").c_str());
 
 2365  box->SetFillColor(0);
 
 2366  box->SetBorderSize(0);
 
 2367  box->SetTextAlign(12);
 
 2368  box->SetTextSize(0.04F);
 
 2369  box->SetFillStyle(0);
 
 2371  for (
const auto param : params) {
 
 2372    auto var = 
static_cast<const RooRealVar*
>(param);
 
 
 2453  name.append(
"_Proj[") ;
 
 2454  if (!
iset.empty()) {
 
 2456    for(
auto const& arg : 
iset) {
 
 2462      name.append(arg->GetName()) ;
 
 
 2512  pc.
defineSet(
"supNormSet",
"SupNormSet",0,
nullptr) ;
 
 2513  pc.
defineInt(
"numScanBins",
"ScanParameters",0,1000) ;
 
 2514  pc.
defineInt(
"intOrder",
"ScanParameters",1,2) ;
 
 2515  pc.
defineInt(
"doScanNum",
"ScanNumCdf",0,1) ;
 
 2516  pc.
defineInt(
"doScanAll",
"ScanAllCdf",0,0) ;
 
 2517  pc.
defineInt(
"doScanNon",
"ScanNoCdf",0,0) ;
 
 2518  pc.
defineMutex(
"ScanNumCdf",
"ScanAllCdf",
"ScanNoCdf") ;
 
 2550      coutI(NumIntegration) << 
"RooAbsPdf::createCdf(" << 
GetName() << 
") integration over observable(s) " << 
iset << 
" involves numeric integration," << endl
 
 2551             << 
"      constructing cdf though numeric integration of sampled pdf in " << 
numScanBins << 
" bins and applying order " 
 2552             << 
intOrder << 
" interpolation on integrated histogram." << endl
 
 2553             << 
"      To override this choice of technique use argument ScanNone(), to change scan parameters use ScanParameters(nbins,order) argument" << endl ;
 
 
 2566  auto ret = std::make_unique<RooNumCdf>(
name.c_str(),
name.c_str(),*
this,*
ivar,
"numcdf");
 
 2568  return RooFit::makeOwningPtr<RooAbsReal>(std::move(
ret));
 
 
 2584  for (
const auto arg : *
comps) {
 
 2585    auto pdf = 
dynamic_cast<const RooAbsPdf*
>(arg) ;
 
 2586    if (pdf && !
ret->find(pdf->GetName())) {
 
 2587      std::unique_ptr<RooArgSet> 
compRet(
 
 
 2643  if (config) 
return config ;
 
 
 2675  delete _genContext ;
 
 
 2710        throw std::runtime_error(
"After a clients caches were cleared, the client was gone! This should not happen.");
 
 2783std::unique_ptr<RooAbsArg>
 
 2810   std::stringstream 
errMsg;
 
 2812          << 
" did not overload RooAbsPdf::createExpectedEventsFunc()!";
 
 2813   coutE(InputArguments) << 
errMsg.str() << std::endl;
 
 
 
bool _init
! Is object initialized
 
static void indent(ostringstream &buf, int indent_level)
 
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 input
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
 
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
 
const_iterator begin() const
 
const_iterator end() const
 
Common abstract base class for objects that represent a value and a "shape" in RooFit.
 
void clearValueAndShapeDirty() const
 
void Print(Option_t *options=nullptr) const override
Print the object to the defaultPrintStream().
 
bool dependsOn(const RooAbsCollection &serverList, const RooAbsArg *ignoreArg=nullptr, bool valueOnly=false) const
Test whether we depend on (ie, are served by) any object in the specified collection.
 
RooFit::OwningPtr< RooArgSet > getParameters(const RooAbsData *data, bool stripDisconnected=true) const
Create a list of leaf nodes in the arg tree starting with ourself as top node that don't match any of...
 
RooFit::OwningPtr< RooArgSet > getObservables(const RooArgSet &set, bool valueOnly=true) const
Given a set of possible observables, return the observables that this PDF depends on.
 
const Text_t * getStringAttribute(const Text_t *key) const
Get string attribute mapped under key 'key'.
 
TIterator Use clients() and begin()
 
virtual std::unique_ptr< RooAbsArg > compileForNormSet(RooArgSet const &normSet, RooFit::Detail::CompileContext &ctx) const
 
RooFit::OwningPtr< RooArgSet > getComponents() const
Create a RooArgSet with all components (branch nodes) of the expression tree headed by this object.
 
bool getAttribute(const Text_t *name) const
Check if a named attribute is set. By default, all attributes are unset.
 
RooAbsCache * getCache(Int_t index) const
Return registered cache object by index.
 
bool isValueDirty() const
 
void setProxyNormSet(const RooArgSet *nset)
Forward a change in the cached normalization argset to all the registered proxies.
 
void branchNodeServerList(RooAbsCollection *list, const RooAbsArg *arg=nullptr, bool recurseNonDerived=false) const
Fill supplied list with all branch nodes of the arg tree starting with ourself as top node.
 
TObject * Clone(const char *newname=nullptr) const override
Make a clone of an object using the Streamer facility.
 
RefCountList_t _serverList
 
Int_t numCaches() const
Return number of registered caches.
 
RooAbsArg * findServer(const char *name) const
Return server of this with name name. Returns nullptr if not found.
 
RooAbsArg * _owner
! Pointer to owning RooAbsArg
 
Abstract base class for objects that represent a discrete value that can be set from the outside,...
 
Abstract container object that can hold multiple RooAbsArg objects.
 
virtual bool add(const RooAbsArg &var, bool silent=false)
Add the specified argument to list.
 
void Print(Option_t *options=nullptr) const override
This method must be overridden when a class wants to print itself.
 
Abstract base class for binned and unbinned datasets.
 
Abstract base class for generator contexts of RooAbsPdf objects.
 
virtual RooDataSet * generate(double nEvents=0, bool skipInit=false, bool extendedMode=false)
Generate the specified number of events with nEvents>0 and and return a dataset containing the genera...
 
virtual void setProtoDataOrder(Int_t *lut)
Set the traversal order of prototype data to that in the lookup tables passed as argument.
 
Normalization set with for above integral.
 
~CacheElem() override
Destructor of normalization cache element.
 
Abstract interface for all probability density functions.
 
virtual bool syncNormalization(const RooArgSet *dset, bool adjustProxies=true) const
Verify that the normalization integral cached with this PDF is valid for given set of normalization o...
 
double getNorm(const RooArgSet &nset) const
Get normalisation term needed to normalise the raw values returned by getVal().
 
std::unique_ptr< RooAbsArg > compileForNormSet(RooArgSet const &normSet, RooFit::Detail::CompileContext &ctx) const override
 
RooObjCacheManager _normMgr
 
std::unique_ptr< RooNumGenConfig > _specGeneratorConfig
! MC generator configuration specific for this object
 
double getValV(const RooArgSet *set=nullptr) const override
Return current value, normalized by integrating over the observables in nset.
 
virtual std::unique_ptr< RooFitResult > fitToImpl(RooAbsData &data, const RooLinkedList &cmdList)
Protected implementation of the likelihood fitting routine.
 
virtual void generateEvent(Int_t code)
Interface for generation of an event using the algorithm corresponding to the specified code.
 
RooFit::OwningPtr< RooAbsReal > createScanCdf(const RooArgSet &iset, const RooArgSet &nset, Int_t numScanBins, Int_t intOrder)
 
void setGeneratorConfig()
Remove the specialized numeric MC generator configuration associated with this object.
 
virtual void resetErrorCounters(Int_t resetValue=10)
Reset error counter to given value, limiting the number of future error messages for this pdf to 'res...
 
static int verboseEval()
Return global level of verbosity for p.d.f. evaluations.
 
RooFit::OwningPtr< RooAbsReal > createCdf(const RooArgSet &iset, const RooArgSet &nset=RooArgSet())
Create a cumulative distribution function of this p.d.f in terms of the observables listed in iset.
 
bool isActiveNormSet(RooArgSet const *normSet) const
Checks if normSet is the currently active normalization set of this PDF, meaning is exactly the same ...
 
virtual double expectedEvents(const RooArgSet *nset) const
Return expected number of events to be used in calculation of extended likelihood.
 
virtual RooAbsGenContext * binnedGenContext(const RooArgSet &vars, bool verbose=false) const
Return a binned generator context.
 
TString _normRange
Normalization range.
 
virtual bool isDirectGenSafe(const RooAbsArg &arg) const
Check if given observable can be safely generated using the pdfs internal generator mechanism (if tha...
 
Int_t * randomizeProtoOrder(Int_t nProto, Int_t nGen, bool resample=false) const
Return lookup table with randomized order for nProto prototype events.
 
void setNormRange(const char *rangeName)
 
~RooAbsPdf() override
Destructor.
 
RooArgSet const  * _normSet
Normalization integral (owned by _normMgr)
 
RooPlot * plotOn(RooPlot *frame, const RooCmdArg &arg1={}, const RooCmdArg &arg2={}, const RooCmdArg &arg3={}, const RooCmdArg &arg4={}, const RooCmdArg &arg5={}, const RooCmdArg &arg6={}, const RooCmdArg &arg7={}, const RooCmdArg &arg8={}, const RooCmdArg &arg9={}, const RooCmdArg &arg10={}) const override
Helper calling plotOn(RooPlot*, RooLinkedList&) const.
 
RooNumGenConfig * specialGeneratorConfig() const
Returns the specialized integrator configuration for this RooAbsReal.
 
virtual bool selfNormalized() const
Shows if a PDF is self-normalized, which means that no attempt is made to add a normalization term.
 
void printMultiline(std::ostream &os, Int_t contents, bool verbose=false, TString indent="") const override
Print multi line detailed information of this RooAbsPdf.
 
Int_t _traceCount
Number of traces remaining to print.
 
bool canBeExtended() const
If true, PDF can provide extended likelihood term.
 
void setTraceCounter(Int_t value, bool allNodes=false)
Reset trace counter to given value, limiting the number of future trace messages for this pdf to 'val...
 
GenSpec * prepareMultiGen(const RooArgSet &whatVars, const RooCmdArg &arg1={}, const RooCmdArg &arg2={}, const RooCmdArg &arg3={}, const RooCmdArg &arg4={}, const RooCmdArg &arg5={}, const RooCmdArg &arg6={})
Prepare GenSpec configuration object for efficient generation of multiple datasets from identical spe...
 
Int_t _errorCount
Number of errors remaining to print.
 
virtual std::unique_ptr< RooAbsReal > createExpectedEventsFunc(const RooArgSet *nset) const
Returns an object that represents the expected number of events for a given normalization set,...
 
virtual RooPlot * paramOn(RooPlot *frame, const RooCmdArg &arg1={}, const RooCmdArg &arg2={}, const RooCmdArg &arg3={}, const RooCmdArg &arg4={}, const RooCmdArg &arg5={}, const RooCmdArg &arg6={}, const RooCmdArg &arg7={}, const RooCmdArg &arg8={})
Add a box with parameter values (and errors) to the specified frame.
 
Int_t _negCount
Number of negative probabilities remaining to print.
 
RooFit::OwningPtr< RooDataSet > generate(const RooArgSet &whatVars, Int_t nEvents, const RooCmdArg &arg1, const RooCmdArg &arg2={}, const RooCmdArg &arg3={}, const RooCmdArg &arg4={}, const RooCmdArg &arg5={})
See RooAbsPdf::generate(const RooArgSet&,const RooCmdArg&,const RooCmdArg&,const RooCmdArg&,...
 
virtual const RooAbsReal * getNormObj(const RooArgSet *set, const RooArgSet *iset, const TNamed *rangeName=nullptr) const
Return pointer to RooAbsReal object that implements calculation of integral over observables iset in ...
 
void setActiveNormSet(RooArgSet const *normSet) const
Setter for the _normSet member, which should never be set directly.
 
double analyticalIntegralWN(Int_t code, const RooArgSet *normSet, const char *rangeName=nullptr) const override
Analytical integral with normalization (see RooAbsReal::analyticalIntegralWN() for further informatio...
 
void setNormRangeOverride(const char *rangeName)
 
virtual RooFit::OwningPtr< RooDataSet > generateSimGlobal(const RooArgSet &whatVars, Int_t nEvents)
Special generator interface for generation of 'global observables' – for RooStats tools.
 
double normalizeWithNaNPacking(double rawVal, double normVal) const
 
virtual RooAbsGenContext * autoGenContext(const RooArgSet &vars, const RooDataSet *prototype=nullptr, const RooArgSet *auxProto=nullptr, bool verbose=false, bool autoBinned=true, const char *binnedTag="") const
 
RooArgSet * getAllConstraints(const RooArgSet &observables, RooArgSet &constrainedParams, bool stripDisconnected=true, bool removeConstraintsFromPdf=false) const
This helper function finds and collects all constraints terms of all component p.d....
 
const RooNumGenConfig * getGeneratorConfig() const
Return the numeric MC generator configuration used for this object.
 
virtual void initGenerator(Int_t code)
Interface for one-time initialization to setup the generator for the specified code.
 
virtual ExtendMode extendMode() const
Returns ability of PDF to provide extended likelihood terms.
 
RooAbsPdf()
Default constructor.
 
virtual RooFit::OwningPtr< RooDataHist > generateBinned(const RooArgSet &whatVars, double nEvents, const RooCmdArg &arg1, const RooCmdArg &arg2={}, const RooCmdArg &arg3={}, const RooCmdArg &arg4={}, const RooCmdArg &arg5={}) const
As RooAbsPdf::generateBinned(const RooArgSet&, const RooCmdArg&,const RooCmdArg&, const RooCmdArg&,...
 
bool traceEvalPdf(double value) const
Check that passed value is positive and not 'not-a-number'.
 
static RooNumGenConfig * defaultGeneratorConfig()
Returns the default numeric MC generator configuration for all RooAbsReals.
 
bool redirectServersHook(const RooAbsCollection &newServerList, bool mustReplaceAll, bool nameChange, bool isRecursiveStep) override
The cache manager.
 
void printValue(std::ostream &os) const override
Print value of p.d.f, also print normalization integral that was last used, if any.
 
virtual std::unique_ptr< RooAbsReal > createNLLImpl(RooAbsData &data, const RooLinkedList &cmdList)
Protected implementation of the NLL creation routine.
 
void logBatchComputationErrors(std::span< const double > &outputs, std::size_t begin) const
Scan through outputs and fix+log all nans and negative values.
 
virtual RooAbsGenContext * genContext(const RooArgSet &vars, const RooDataSet *prototype=nullptr, const RooArgSet *auxProto=nullptr, bool verbose=false) const
Interface function to create a generator context from a p.d.f.
 
void getLogProbabilities(std::span< const double > pdfValues, double *output) const
 
static TString _normRangeOverride
 
static Int_t _verboseEval
 
double extendedTerm(double sumEntries, double expected, double sumEntriesW2=0.0, bool doOffset=false) const
 
virtual Int_t getGenerator(const RooArgSet &directVars, RooArgSet &generateVars, bool staticInitOK=true) const
Load generatedVars with the subset of directVars that we can generate events for, and return a code t...
 
virtual RooAbsPdf * createProjection(const RooArgSet &iset)
Return a p.d.f that represent a projection of this p.d.f integrated over given observables.
 
virtual double getLogVal(const RooArgSet *set=nullptr) const
Return the log of the current value with given normalization An error message is printed if the argum...
 
bool hasRange(const char *name) const override
Check if variable has a binning with given name.
 
std::pair< double, double > getRange(const char *name=nullptr) const
Get low and high bound of the variable.
 
Abstract base class for objects that represent a real value and implements functionality common to al...
 
RooDataHist * fillDataHist(RooDataHist *hist, const RooArgSet *nset, double scaleFactor, bool correctForBinVolume=false, bool showProgress=false) const
Fill a RooDataHist with values sampled from this function at the bin centers.
 
void plotOnCompSelect(RooArgSet *selNodes) const
Helper function for plotting of composite p.d.fs.
 
RooFit::OwningPtr< RooAbsReal > createIntegral(const RooArgSet &iset, const RooCmdArg &arg1, const RooCmdArg &arg2={}, const RooCmdArg &arg3={}, const RooCmdArg &arg4={}, const RooCmdArg &arg5={}, const RooCmdArg &arg6={}, const RooCmdArg &arg7={}, const RooCmdArg &arg8={}) const
Create an object that represents the integral of the function over one or more observables listed in ...
 
double getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
 
bool plotSanityChecks(RooPlot *frame) const
Utility function for plotOn(), perform general sanity check on frame to ensure safe plotting operatio...
 
void printMultiline(std::ostream &os, Int_t contents, bool verbose=false, TString indent="") const override
Structure printing.
 
bool redirectServersHook(const RooAbsCollection &newServerList, bool mustReplaceAll, bool nameChange, bool isRecursiveStep) override
Function that is called at the end of redirectServers().
 
double _value
Cache for current value of object.
 
virtual double analyticalIntegral(Int_t code, const char *rangeName=nullptr) const
Implements the actual analytical integral(s) advertised by getAnalyticalIntegral.
 
TString integralNameSuffix(const RooArgSet &iset, const RooArgSet *nset=nullptr, const char *rangeName=nullptr, bool omitEmpty=false) const
Construct string with unique suffix name to give to integral object that encodes integrated observabl...
 
virtual double evaluate() const =0
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
 
void logEvalError(const char *message, const char *serverValueString=nullptr) const
Log evaluation error message.
 
const RooNumIntConfig * getIntegratorConfig() const
Return the numeric integration configuration used for this object.
 
virtual bool isBinnedDistribution(const RooArgSet &) const
Tests if the distribution is binned. Unless overridden by derived classes, this always returns false.
 
RooFit::OwningPtr< RooAbsReal > createIntRI(const RooArgSet &iset, const RooArgSet &nset={})
Utility function for createRunningIntegral.
 
virtual RooPlot * plotOn(RooPlot *frame, const RooCmdArg &arg1={}, const RooCmdArg &arg2={}, const RooCmdArg &arg3={}, const RooCmdArg &arg4={}, const RooCmdArg &arg5={}, const RooCmdArg &arg6={}, const RooCmdArg &arg7={}, const RooCmdArg &arg8={}, const RooCmdArg &arg9={}, const RooCmdArg &arg10={}) const
Plot (project) PDF on specified frame.
 
RooArgList is a container object that can hold multiple RooAbsArg objects.
 
RooArgSet is a container object that can hold multiple RooAbsArg objects.
 
Efficient implementation of the generator context specific for binned pdfs.
 
Int_t setObj(const RooArgSet *nset, T *obj, const TNamed *isetRangeName=nullptr)
Setter function without integration set.
 
T * getObj(const RooArgSet *nset, Int_t *sterileIndex=nullptr, const TNamed *isetRangeName=nullptr)
Getter function without integration set.
 
Implementation of RooAbsCachedReal that can cache any external RooAbsReal input function provided in ...
 
Named container for two doubles, two integers two object points and three string pointers that can be...
 
Configurable parser for RooCmdArg named arguments.
 
void defineMutex(const char *head, Args_t &&... tail)
Define arguments where any pair is mutually exclusive.
 
bool process(const RooCmdArg &arg)
Process given RooCmdArg.
 
bool hasProcessed(const char *cmdName) const
Return true if RooCmdArg with name 'cmdName' has been processed.
 
double getDouble(const char *name, double defaultValue=0.0) const
Return double property registered with name 'name'.
 
bool defineDouble(const char *name, const char *argName, int doubleNum, double defValue=0.0)
Define double property name 'name' mapped to double in slot 'doubleNum' in RooCmdArg with name argNam...
 
static void stripCmdList(RooLinkedList &cmdList, const char *cmdsToPurge)
Utility function that strips command names listed (comma separated) in cmdsToPurge from cmdList.
 
RooArgSet * getSet(const char *name, RooArgSet *set=nullptr) const
Return RooArgSet property registered with name 'name'.
 
bool defineSet(const char *name, const char *argName, int setNum, const RooArgSet *set=nullptr)
Define TObject property name 'name' mapped to object in slot 'setNum' in RooCmdArg with name argName ...
 
bool ok(bool verbose) const
Return true of parsing was successful.
 
bool defineObject(const char *name, const char *argName, int setNum, const TObject *obj=nullptr, bool isArray=false)
Define TObject property name 'name' mapped to object in slot 'setNum' in RooCmdArg with name argName ...
 
const char * getString(const char *name, const char *defaultValue="", bool convEmptyToNull=false) const
Return string property registered with name 'name'.
 
bool defineString(const char *name, const char *argName, int stringNum, const char *defValue="", bool appendMode=false)
Define double property name 'name' mapped to double in slot 'stringNum' in RooCmdArg with name argNam...
 
bool defineInt(const char *name, const char *argName, int intNum, int defValue=0)
Define integer property name 'name' mapped to integer in slot 'intNum' in RooCmdArg with name argName...
 
void allowUndefined(bool flag=true)
If flag is true the processing of unrecognized RooCmdArgs is not considered an error.
 
int getInt(const char *name, int defaultValue=0) const
Return integer property registered with name 'name'.
 
TObject * getObject(const char *name, TObject *obj=nullptr) const
Return TObject property registered with name 'name'.
 
Container class to hold unbinned data.
 
void markAsCompiled(RooAbsArg &arg) const
 
void compileServers(RooAbsArg &arg, RooArgSet const &normSet)
 
Implements a universal generator context for all RooAbsPdf classes that do not have or need a special...
 
Switches the message service to a different level while the instance is alive.
 
Collection class for internal use, storing a collection of RooAbsArg pointers in a doubly linked list...
 
static const char * str(const TNamed *ptr)
Return C++ string corresponding to given TNamed pointer.
 
Holds the configuration parameters of the various numeric integrators used by RooRealIntegral.
 
static RooNumGenConfig & defaultConfig()
Return reference to instance of default numeric integrator configuration object.
 
Implementation of a RooCacheManager<RooAbsCacheElement> that specializes in the storage of cache elem...
 
void sterilize() override
Clear the cache payload but retain slot mapping w.r.t to normalization and integration sets.
 
Plot frame and a container for graphics objects within that frame.
 
void addObject(TObject *obj, Option_t *drawOptions="", bool invisible=false)
Add a generic object to this plot.
 
double getFitRangeNEvt() const
Return the number of events in the fit range.
 
const RooArgSet * getNormVars() const
 
RooAbsRealLValue * getPlotVar() const
 
void updateNormVars(const RooArgSet &vars)
Install the given set of observables are reference normalization variables for this frame.
 
double getFitRangeBinW() const
Return the bin width that is being used to normalise the PDF.
 
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,...
 
A RooAbsPdf implementation that represent a projection of a given input p.d.f and the object returned...
 
static UInt_t integer(UInt_t max, TRandom *generator=randomGenerator())
Return an integer uniformly distributed from [0,n-1].
 
static TRandom * randomGenerator()
Return a pointer to a singleton random-number generator implementation.
 
Performs hybrid numerical/analytical integrals of RooAbsReal objects.
 
const RooArgSet & numIntRealVars() const
 
Variable that can be changed from the outside.
 
The TNamed class is the base class for all named ROOT classes.
 
const char * GetName() const override
Returns name of object.
 
const char * GetTitle() const override
Returns title of object.
 
virtual const char * ClassName() const
Returns name of class to which the object belongs.
 
A Pave (see TPave) with text, lines or/and boxes inside.
 
void Clear()
Clear string without changing its capacity.
 
const char * Data() const
 
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
 
RooCmdArg SupNormSet(const RooArgSet &nset)
 
RooCmdArg NormRange(const char *rangeNameList)
 
RooCmdArg Range(const char *rangeName, bool adjustNorm=true)
 
RooCmdArg Normalization(double scaleFactor)
 
std::vector< std::string > Split(std::string_view str, std::string_view delims, bool skipEmpty=false)
Splits a string at each character in delims.
 
T * OwningPtr
An alias for raw pointers for indicating that the return type of a RooFit function is an owning point...
 
OwningPtr< T > makeOwningPtr(std::unique_ptr< T > &&ptr)
Internal helper to turn a std::unique_ptr<T> into an OwningPtr.
 
RooArgSet selectFromArgSet(RooArgSet const &, std::string const &names)
 
std::string getColonSeparatedNameString(RooArgSet const &argSet, char delim=':')
 
Double_t QuietNaN()
Returns a quiet NaN as defined by IEEE 754.
 
static double packFloatIntoNaN(float payload)
Pack float into mantissa of a NaN.