195bool interpretExtendedCmdArg(
RooAbsPdf const& pdf,
int extendedCmdArg) {
197 if (extendedCmdArg == 2) {
201 <<
"p.d.f. provides expected number of events, including extended term in likelihood." << std::endl;
205 return extendedCmdArg;
240 RooAbsReal(
name,title), _normMgr(this,10), _selectComp(true), _specGeneratorConfig(0)
252 double plotMin,
double plotMax) :
253 RooAbsReal(
name,title,plotMin,plotMax), _normMgr(this,10), _selectComp(true), _specGeneratorConfig(0)
266 _normMgr(other._normMgr,this), _selectComp(other._selectComp), _normRange(other._normRange)
291 if (normVal < 0. || (normVal == 0. && rawVal != 0)) {
293 const std::string msg =
"p.d.f normalization integral is zero or negative: " + std::to_string(normVal);
300 logEvalError(
Form(
"p.d.f value is less than zero (%f), trying to recover", rawVal));
311 return (rawVal == 0. && normVal == 0.) ? 0. : rawVal / normVal;
341 bool nsetChanged(
false) ;
382 auto * prevNorm =
_norm;
399 cxcoutD(
Eval) <<
"RooAbsPdf::analyticalIntegralWN(" <<
GetName() <<
") code = " << code <<
" normset = " << (normSet?*normSet:
RooArgSet()) << endl ;
402 if (code==0)
return getVal(normSet) ;
431 if(!error)
return error ;
454 if (!nset)
return 1 ;
462 coutW(
Eval) <<
"RooAbsPdf::getNorm(" <<
GetName() <<
":: WARNING normalization is zero, nset = " ; nset->
Print(
"1") ;
482 return cache->
_norm ;
525 if (nsetChanged && adjustProxies) {
535 ((
RooAbsPdf*)
this)->setProxyNormSet(nset) ;
544 <<
") recreating normalization integral " << endl ;
553 auto ntitle = std::string(
GetTitle()) +
" Unit Normalization";
554 auto nname = std::string(
GetName()) +
"_UnitNorm";
565 if (cacheParamsStr && strlen(cacheParamsStr)) {
567 std::unique_ptr<RooArgSet> intParams{normInt->
getVariables()} ;
571 if (!cacheParams.
empty()) {
573 <<
"-dim value cache for integral over " << depList <<
" as a function of " << cacheParams <<
" in range " << (nr?nr:
"<default>") << endl ;
582 normInt= cachedIntegral ;
644 double prob =
getVal(nset) ;
646 if (
fabs(prob)>1e6) {
647 coutW(
Eval) <<
"RooAbsPdf::getLogVal(" <<
GetName() <<
") WARNING: top-level pdf has a large value: " << prob << endl ;
651 logEvalError(
"getLogVal() top-level p.d.f evaluates to a negative number") ;
656 logEvalError(
"getLogVal() top-level p.d.f evaluates to zero") ;
658 return -std::numeric_limits<double>::infinity();
662 logEvalError(
"getLogVal() top-level p.d.f evaluates to NaN") ;
677bool checkInfNaNNeg(
const T& inputs) {
683 for (
double val : inputs) {
684 inf |= !std::isfinite(val);
689 return inf || nan || neg;
700 for (
unsigned int i=0; i<outputs.
size(); ++i) {
701 const double value = outputs[i];
705 }
else if (!std::isfinite(outputs[i])){
708 }
else if (outputs[i] < 0.) {
709 logEvalError(
Form(
"p.d.f value of (%s) is less than zero (%f) for entry %zu",
723 auto pdfValues =
getValues(evalData, normSet);
734 if (checkInfNaNNeg(pdfValues)) {
737 for (std::size_t i = 0; i < pdfValues.
size(); ++i) {
738 const double prob = pdfValues[i];
744 }
else if (std::isnan(prob)) {
754 for (std::size_t i = 0; i < pdfValues.
size(); ++i) {
755 const double prob = pdfValues[i];
815 logEvalError(
"extendedTerm #expected events is <0 return a NaN");
827 logEvalError(
"extendedTerm #expected events is a NaN") ;
831 double extra = expected - sumEntries*
log(expected);
833 if(sumEntriesW2 != 0.0) {
834 extra *= sumEntriesW2 / sumEntries;
865 double sumW =
data.sumEntries();
868 sumW2 =
data.sumEntriesW2();
961std::unique_ptr<RooAbsReal> createMultiRangeNLLCorrectionTerm(
964 double sumEntriesTotal = 0.0;
969 for (
const auto ¤tRangeName :
ROOT::Split(rangeNames,
",")) {
970 const std::string currentName = baseName +
"_" + currentRangeName;
972 auto sumEntriesCurrent =
data.sumEntries(
"1", currentRangeName.c_str());
973 sumEntriesTotal += sumEntriesCurrent;
977 auto pdfIntegralCurrent = pdf.
createIntegral(depList, &depList,
nullptr, currentRangeName.c_str());
979 auto term =
new RooFormulaVar((currentName +
"_correctionTerm").c_str(),
980 (std::string(
"-(") + std::to_string(sumEntriesCurrent) +
" * log(x[0]))").c_str(),
984 integralList.
add(*pdfIntegralCurrent);
987 auto integralFull =
new RooAddition((baseName +
"_correctionFullIntegralTerm").c_str(),
992 auto fullRangeTerm =
new RooFormulaVar((baseName +
"_foobar").c_str(),
993 (std::string(
"(") + std::to_string(sumEntriesTotal) +
" * log(x[0]))").c_str(),
996 termList.
add(*fullRangeTerm);
997 return std::unique_ptr<RooAbsReal>{
998 new RooAddition((baseName +
"_correction").c_str(),
"correction", termList,
true)};
1015 auto baseName = std::string(
"nll_") +
GetName() +
"_" +
data.GetName();
1020 pc.defineString(
"rangeName",
"RangeWithName",0,
"",
true) ;
1021 pc.defineString(
"addCoefRange",
"SumCoefRange",0,
"") ;
1022 pc.defineString(
"globstag",
"GlobalObservablesTag",0,
"") ;
1023 pc.defineString(
"globssource",
"GlobalObservablesSource",0,
"data") ;
1024 pc.defineDouble(
"rangeLo",
"Range",0,-999.) ;
1025 pc.defineDouble(
"rangeHi",
"Range",1,-999.) ;
1026 pc.defineInt(
"splitRange",
"SplitRange",0,0) ;
1027 pc.defineInt(
"ext",
"Extended",0,2) ;
1028 pc.defineInt(
"numcpu",
"NumCPU",0,1) ;
1029 pc.defineInt(
"interleave",
"NumCPU",1,0) ;
1030 pc.defineInt(
"verbose",
"Verbose",0,0) ;
1031 pc.defineInt(
"optConst",
"Optimize",0,0) ;
1032 pc.defineInt(
"cloneData",
"CloneData", 0, 2);
1033 pc.defineObject(
"projDepSet",
"ProjectedObservables",0,0) ;
1034 pc.defineSet(
"cPars",
"Constrain",0,0) ;
1035 pc.defineSet(
"glObs",
"GlobalObservables",0,0) ;
1036 pc.defineInt(
"doOffset",
"OffsetLikelihood",0,0) ;
1037 pc.defineSet(
"extCons",
"ExternalConstraints",0,0) ;
1038 pc.defineInt(
"BatchMode",
"BatchMode", 0, 0);
1039 pc.defineDouble(
"IntegrateBins",
"IntegrateBins", 0, -1.);
1040 pc.defineMutex(
"Range",
"RangeWithName") ;
1041 pc.defineMutex(
"GlobalObservables",
"GlobalObservablesTag") ;
1044 pc.process(cmdList) ;
1050 const char* rangeName =
pc.getString(
"rangeName",0,
true) ;
1051 const char* addCoefRangeName =
pc.getString(
"addCoefRange",0,
true) ;
1052 const bool ext = interpretExtendedCmdArg(*
this,
pc.getInt(
"ext")) ;
1053 Int_t numcpu =
pc.getInt(
"numcpu") ;
1054 Int_t numcpu_strategy =
pc.getInt(
"interleave");
1056 if (numcpu_strategy==3 && !this->
InheritsFrom(
"RooSimultaneous") ) {
1057 coutW(
Minimization) <<
"Cannot use a NumCpu Strategy = 3 when the pdf is not a RooSimultaneus, "
1058 "falling back to default strategy = 0" << endl;
1059 numcpu_strategy = 0;
1063 Int_t splitr =
pc.getInt(
"splitRange") ;
1065 Int_t optConst =
pc.getInt(
"optConst") ;
1066 Int_t cloneData =
pc.getInt(
"cloneData") ;
1067 Int_t doOffset =
pc.getInt(
"doOffset") ;
1071 cloneData = optConst ;
1077 if (
pc.hasProcessed(
"Range")) {
1078 double rangeLo =
pc.getDouble(
"rangeLo") ;
1079 double rangeHi =
pc.getDouble(
"rangeHi") ;
1084 for (
auto arg : obs) {
1086 if (rrv) rrv->
setRange(
"fit",rangeLo,rangeHi) ;
1094 auto tmp =
static_cast<RooArgSet*
>(
pc.getObject(
"projDepSet")) ;
1096 projDeps.
add(*tmp) ;
1099 const std::string globalObservablesSource =
pc.getString(
"globssource",
"data",
false);
1100 if(globalObservablesSource !=
"data" && globalObservablesSource !=
"model") {
1101 std::string errMsg =
"RooAbsPdf::fitTo: GlobalObservablesSource can only be \"data\" or \"model\"!";
1103 throw std::invalid_argument(errMsg);
1105 const bool takeGlobalObservablesFromData = globalObservablesSource ==
"data";
1111 baseName +
"_constr",
1115 pc.getSet(
"extCons"),
1117 pc.getString(
"globstag",0,
true),
1118 takeGlobalObservablesFromData,
1127 std::move(constraintTerm),
1128 rangeName ? rangeName :
"",
1129 addCoefRangeName ? addCoefRangeName :
"",
1132 pc.getDouble(
"IntegrateBins"),
1133 batchMode).release();
1138 std::unique_ptr<RooAbsReal> nll ;
1149 if (!rangeName || strchr(rangeName,
',')==0) {
1153 cfg.
rangeName = rangeName ? rangeName :
"";
1154 nll = std::make_unique<RooNLLVar>(baseName.c_str(),
"-log(likelihood)",*
this,
data,projDeps, ext, cfg);
1161 throw std::runtime_error(
1162 std::string(
"Error in RooAbsPdf::createNLL! The ranges ") + rangeName +
" are overlapping!");
1164 for (
const auto& token : tokens) {
1166 auto nllComp = std::make_unique<RooNLLVar>((baseName +
"_" + token).c_str(),
"-log(likelihood)",
1167 *
this,
data,projDeps,ext,cfg);
1168 nllComp->batchMode(
pc.getInt(
"BatchMode"));
1169 nllList.
addOwned(std::move(nllComp)) ;
1180 nllList.
addOwned(createMultiRangeNLLCorrectionTerm(*
this,
data, baseName, rangeName));
1183 nll = std::make_unique<RooAddition>(baseName.c_str(),
"-log(likelihood)",nllList) ;
1184 nll->addOwnedComponents(std::move(nllList));
1189 if (constraintTerm) {
1190 auto orignll = std::move(nll) ;
1191 nll = std::make_unique<RooAddition>(
Form(
"%s_with_constr",baseName.c_str()),
"nllWithCons",
RooArgSet(*orignll,*constraintTerm)) ;
1192 nll->addOwnedComponents(std::move(orignll),std::move(constraintTerm)) ;
1200 nll->enableOffsetting(
true) ;
1203 return nll.release() ;
1221 std::unique_ptr<RooFitResult> rw(minimizer.
save());
1225 <<
"RooAbsPdf::fitTo(" << this->
GetName()
1226 <<
") Calculating covariance matrix according to the asymptotically correct approach. If you find this "
1227 "method useful please consider citing https://arxiv.org/abs/1911.01303."
1231 auto nFloatPars = rw->floatParsFinal().getSize();
1233 for (
int k = 0; k < nFloatPars; k++) {
1234 for (
int l = 0;
l < nFloatPars;
l++) {
1241 std::vector<std::unique_ptr<RooDerivative>> derivatives;
1242 const RooArgList &floated = rw->floatParsFinal();
1243 std::unique_ptr<RooArgSet> floatingparams{
1245 for (
const auto paramresult : floated) {
1246 auto paraminternal =
static_cast<RooRealVar *
>(floatingparams->find(*paramresult));
1248 derivatives.emplace_back(this->
derivative(*paraminternal, obs, 1));
1252 for (
int j = 0; j <
data.numEntries(); j++) {
1256 std::vector<double> diffs(floated.
getSize(), 0.0);
1257 for (
int k = 0; k < floated.
getSize(); k++) {
1258 const auto paramresult =
static_cast<RooRealVar *
>(floated.
at(k));
1259 auto paraminternal =
static_cast<RooRealVar *
>(floatingparams->find(*paramresult));
1261 double diff = derivatives[k]->
getVal();
1263 *paraminternal = paramresult->getVal();
1267 double prob =
getVal(&obs);
1268 for (
int k = 0; k < floated.
getSize(); k++) {
1269 for (
int l = 0;
l < floated.
getSize();
l++) {
1270 num(k,
l) +=
data.weight() *
data.weight() * diffs[k] * diffs[
l] / (prob * prob);
1282 return rw->covQual();
1301 std::unique_ptr<RooFitResult> rw{minimizer.
save()};
1304 <<
") Calculating sum-of-weights-squared correction matrix for covariance matrix"
1307 std::unique_ptr<RooFitResult> rw2{minimizer.
save()};
1316 <<
") ERROR: Cannot apply sum-of-weights correction to covariance matrix: correction "
1317 "matrix calculated with weight-squared is singular"
1326 for (
int i = 0; i < matC.
GetNrows(); ++i) {
1327 for (
int j = 0; j < i; ++j) {
1328 matC(j, i) = matC(i, j);
1336 return std::min(rw->covQual(), rw2->covQual());
1501 bool weightedData =
data.isNonPoissonWeighted();
1505 coutW(
InputArguments) <<
"RooAbsPdf::fitTo(" <<
GetName() <<
") WARNING: a likelihood fit is requested of what appears to be weighted data.\n"
1506 <<
" While the estimated values of the parameters will always be calculated taking the weights into account,\n"
1507 <<
" there are multiple ways to estimate the errors of the parameters. You are advised to make an \n"
1508 <<
" explicit choice for the error calculation:\n"
1509 <<
" - Either provide SumW2Error(true), to calculate a sum-of-weights-corrected HESSE error matrix\n"
1510 <<
" (error will be proportional to the number of events in MC).\n"
1511 <<
" - Or provide SumW2Error(false), to return errors from original HESSE error matrix\n"
1512 <<
" (which will be proportional to the sum of the weights, i.e., a dataset with <sum of weights> events).\n"
1513 <<
" - Or provide AsymptoticError(true), to use the asymptotically correct expression\n"
1514 <<
" (for details see https://arxiv.org/abs/1911.01303)."
1519 coutE(
InputArguments) <<
"RooAbsPdf::fitTo(" <<
GetName() <<
"): sum-of-weights and asymptotic error correction do not work with MINOS errors. Not fitting." << endl;
1523 coutW(
InputArguments) <<
"RooAbsPdf::fitTo(" <<
GetName() <<
") WARNING: asymptotic correction does not apply to MINOS errors" << endl ;
1528 coutE(
InputArguments) <<
"RooAbsPdf::fitTo(" <<
GetName() <<
") ERROR: Cannot compute both asymptotically correct and SumW2 errors." << endl ;
1535 m.setMinimizerType(cfg.
minType.c_str());
1538 m.setPrintEvalErrors(cfg.
numee);
1546 if (cfg.
hesse)
m.hesse();
1548 int corrCovQual = -1;
1550 if (
m.getNPar()>0) {
1558 std::unique_ptr<RooFitResult> ret;
1560 auto name = std::string(
"fitresult_") +
GetName() +
"_" +
data.GetName();
1561 auto title = std::string(
"Result of fit of p.d.f. ") +
GetName() +
" to dataset " +
data.GetName();
1562 ret.reset(
m.save(
name.c_str(),title.c_str()));
1587 RooLinkedList nllCmdList =
pc.filterCmdList(fitCmdList,
"ProjectedObservables,Extended,Range,"
1588 "RangeWithName,SumCoefRange,NumCPU,SplitRange,Constrained,Constrain,ExternalConstraints,"
1589 "CloneData,GlobalObservables,GlobalObservablesSource,GlobalObservablesTag,OffsetLikelihood,"
1590 "BatchMode,IntegrateBins");
1596 pc.defineDouble(
"prefit",
"Prefit",0,0);
1597 pc.defineDouble(
"RecoverFromUndefinedRegions",
"RecoverFromUndefinedRegions",0,minimizerDefaults.
recoverFromNaN);
1598 pc.defineInt(
"optConst",
"Optimize",0,minimizerDefaults.
optConst) ;
1599 pc.defineInt(
"verbose",
"Verbose",0,minimizerDefaults.
verbose) ;
1600 pc.defineInt(
"doSave",
"Save",0,minimizerDefaults.
doSave) ;
1601 pc.defineInt(
"doTimer",
"Timer",0,minimizerDefaults.
doTimer) ;
1602 pc.defineInt(
"printLevel",
"PrintLevel",0,minimizerDefaults.
printLevel) ;
1603 pc.defineInt(
"strat",
"Strategy",0,minimizerDefaults.
strat) ;
1604 pc.defineInt(
"initHesse",
"InitialHesse",0,minimizerDefaults.
initHesse) ;
1605 pc.defineInt(
"hesse",
"Hesse",0,minimizerDefaults.
hesse) ;
1606 pc.defineInt(
"minos",
"Minos",0,minimizerDefaults.
minos) ;
1607 pc.defineInt(
"numee",
"PrintEvalErrors",0,minimizerDefaults.
numee) ;
1608 pc.defineInt(
"doEEWall",
"EvalErrorWall",0,minimizerDefaults.
doEEWall) ;
1609 pc.defineInt(
"doWarn",
"Warnings",0,minimizerDefaults.
doWarn) ;
1610 pc.defineInt(
"doSumW2",
"SumW2Error",0,minimizerDefaults.
doSumW2) ;
1611 pc.defineInt(
"doAsymptoticError",
"AsymptoticError",0,minimizerDefaults.
doAsymptotic) ;
1612 pc.defineInt(
"doOffset",
"OffsetLikelihood",0,0) ;
1613 pc.defineString(
"mintype",
"Minimizer",0,minimizerDefaults.
minType.c_str()) ;
1614 pc.defineString(
"minalg",
"Minimizer",1,minimizerDefaults.
minAlg.c_str()) ;
1615 pc.defineObject(
"minosSet",
"Minos",0,minimizerDefaults.
minosSet) ;
1616 pc.defineMutex(
"Range",
"RangeWithName") ;
1619 pc.process(fitCmdList) ;
1625 double prefit =
pc.getDouble(
"prefit");
1626 Int_t optConst =
pc.getInt(
"optConst") ;
1633 conf.
defineInt(
"BatchMode",
"BatchMode",0,0);
1636 if (conf.
getInt(
"BatchMode") != 0) {
1642 size_t nEvents =
static_cast<size_t>(prefit*
data.numEntries());
1643 if (prefit > 0.5 || nEvents < 100) {
1645 <<
"With the current PrefitDataFraction=" << prefit
1646 <<
", the number of events would be " << nEvents<<
" out of "
1647 <<
data.numEntries() <<
". Skipping prefit..." << endl;
1650 size_t step =
data.numEntries()/nEvents;
1654 if (
data.isWeighted()) tinyVars.
add(weight);
1659 for (
int i=0; i<
data.numEntries(); i+=step)
1665 pc.filterCmdList(tinyCmdList,
"Prefit,Hesse,Minos,Verbose,Save,Timer");
1669 tinyCmdList.
Add(&hesse_option);
1670 tinyCmdList.
Add(&print_option);
1672 fitTo(tiny,tinyCmdList);
1676 std::unique_ptr<RooAbsReal> nll{
createNLL(
data,nllCmdList)};
1685 cfg.
strat =
pc.getInt(
"strat");
1687 cfg.
hesse =
pc.getInt(
"hesse");
1688 cfg.
minos =
pc.getInt(
"minos");
1689 cfg.
numee =
pc.getInt(
"numee");
1695 cfg.
minType =
pc.getString(
"mintype",
"Minuit");
1696 cfg.
minAlg =
pc.getString(
"minalg",
"minuit");
1713 RooLinkedList chi2CmdList =
pc.filterCmdList(fitCmdList,
"Range,RangeWithName,NumCPU,Optimize,ProjectedObservables,AddCoefRange,SplitRange,DataError,Extended,IntegrateBins") ;
1763 pc.defineString(
"rangeName",
"RangeWithName",0,
"",
true) ;
1764 pc.allowUndefined(
true) ;
1765 pc.process(cmdList) ;
1769 const char* rangeName =
pc.getString(
"rangeName",0,
true) ;
1779 if (!rangeName || strchr(rangeName,
',')==0) {
1782 chi2 =
new RooChi2Var(baseName.c_str(),baseName.c_str(),*
this,
data,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) ;
1788 string rcmd =
"RangeWithName" ;
1789 if (arg1.
GetName()==rcmd) rarg = &arg1 ;
1790 if (arg2.
GetName()==rcmd) rarg = &arg2 ;
1791 if (arg3.
GetName()==rcmd) rarg = &arg3 ;
1792 if (arg4.
GetName()==rcmd) rarg = &arg4 ;
1793 if (arg5.
GetName()==rcmd) rarg = &arg5 ;
1794 if (arg6.
GetName()==rcmd) rarg = &arg6 ;
1795 if (arg7.
GetName()==rcmd) rarg = &arg7 ;
1796 if (arg8.
GetName()==rcmd) rarg = &arg8 ;
1800 for (std::string& token :
ROOT::Split(rangeName,
",")) {
1804 &arg1==rarg?subRangeCmd:arg1,&arg2==rarg?subRangeCmd:arg2,
1805 &arg3==rarg?subRangeCmd:arg3,&arg4==rarg?subRangeCmd:arg4,
1806 &arg5==rarg?subRangeCmd:arg5,&arg6==rarg?subRangeCmd:arg6,
1807 &arg7==rarg?subRangeCmd:arg7,&arg8==rarg?subRangeCmd:arg8) ;
1808 chi2List.
add(*chi2Comp) ;
1810 chi2 =
new RooAddition(baseName.c_str(),
"chi^2",chi2List,
true) ;
1829 pc.defineInt(
"integrate",
"Integrate",0,0) ;
1830 pc.defineObject(
"yvar",
"YVar",0,0) ;
1833 pc.process(cmdList) ;
1839 bool integrate =
pc.getInt(
"integrate") ;
1879 os <<
indent <<
"--- RooAbsPdf ---" << endl;
1882 os <<
indent <<
" Normalization integral: " << endl ;
1883 auto moreIndent = std::string(
indent.Data()) +
" " ;
1913 bool verbose,
bool autoBinned,
const char* binnedTag)
const
1915 if (prototype || (auxProto && auxProto->
getSize()>0)) {
1991 pc.defineObject(
"proto",
"PrototypeData",0,0) ;
1992 pc.defineString(
"dsetName",
"Name",0,
"") ;
1993 pc.defineInt(
"randProto",
"PrototypeData",0,0) ;
1994 pc.defineInt(
"resampleProto",
"PrototypeData",1,0) ;
1995 pc.defineInt(
"verbose",
"Verbose",0,0) ;
1996 pc.defineInt(
"extended",
"Extended",0,0) ;
1997 pc.defineInt(
"nEvents",
"NumEvents",0,0) ;
1998 pc.defineInt(
"autoBinned",
"AutoBinned",0,1) ;
1999 pc.defineInt(
"expectedData",
"ExpectedData",0,0) ;
2000 pc.defineDouble(
"nEventsD",
"NumEventsD",0,-1.) ;
2001 pc.defineString(
"binnedTag",
"GenBinned",0,
"") ;
2002 pc.defineMutex(
"GenBinned",
"ProtoData") ;
2003 pc.defineMutex(
"Extended",
"NumEvents");
2006 pc.process(arg1,arg2,arg3,arg4,arg5,arg6) ;
2013 const char* dsetName =
pc.getString(
"dsetName") ;
2015 bool randProto =
pc.getInt(
"randProto") ;
2016 bool resampleProto =
pc.getInt(
"resampleProto") ;
2017 bool extended =
pc.getInt(
"extended") ;
2018 bool autoBinned =
pc.getInt(
"autoBinned") ;
2019 const char* binnedTag =
pc.getString(
"binnedTag") ;
2020 Int_t nEventsI =
pc.getInt(
"nEvents") ;
2021 double nEventsD =
pc.getInt(
"nEventsD") ;
2023 bool expectedData =
pc.getInt(
"expectedData") ;
2025 double nEvents = (nEventsD>0) ? nEventsD :
double(nEventsI);
2034 }
else if (nEvents==0) {
2035 cxcoutI(
Generation) <<
"No number of events specified , number of events generated is "
2039 if (extended && protoData && !randProto) {
2040 cxcoutI(
Generation) <<
"WARNING Using generator option Extended() (Poisson distribution of #events) together "
2041 <<
"with a prototype dataset implies incomplete sampling or oversampling of proto data. "
2042 <<
"Set randomize flag in ProtoData() option to randomize prototype dataset order and thus "
2043 <<
"to randomize the set of over/undersampled prototype events for each generation cycle." << endl ;
2056 if (dsetName && strlen(dsetName)>0) {
2057 data->SetName(dsetName) ;
2083 pc.defineObject(
"proto",
"PrototypeData",0,0) ;
2084 pc.defineString(
"dsetName",
"Name",0,
"") ;
2085 pc.defineInt(
"randProto",
"PrototypeData",0,0) ;
2086 pc.defineInt(
"resampleProto",
"PrototypeData",1,0) ;
2087 pc.defineInt(
"verbose",
"Verbose",0,0) ;
2088 pc.defineInt(
"extended",
"Extended",0,0) ;
2089 pc.defineInt(
"nEvents",
"NumEvents",0,0) ;
2090 pc.defineInt(
"autoBinned",
"AutoBinned",0,1) ;
2091 pc.defineString(
"binnedTag",
"GenBinned",0,
"") ;
2092 pc.defineMutex(
"GenBinned",
"ProtoData") ;
2096 pc.process(arg1,arg2,arg3,arg4,arg5,arg6) ;
2103 const char* dsetName =
pc.getString(
"dsetName") ;
2104 Int_t nEvents =
pc.getInt(
"nEvents") ;
2106 bool randProto =
pc.getInt(
"randProto") ;
2107 bool resampleProto =
pc.getInt(
"resampleProto") ;
2108 bool extended =
pc.getInt(
"extended") ;
2109 bool autoBinned =
pc.getInt(
"autoBinned") ;
2110 const char* binnedTag =
pc.getString(
"binnedTag") ;
2114 return new GenSpec(cx,whatVars,protoData,nEvents,extended,randProto,resampleProto,dsetName) ;
2164 return new RooDataSet(
"emptyData",
"emptyData",whatVars) ;
2174 if(0 != context && context->
isValid()) {
2175 generated= context->
generate(nEvents,
false, extended);
2180 if(0 != context)
delete context;
2191 double nEvents,
bool ,
bool randProtoOrder,
bool resampleProto,
2192 bool skipInit,
bool extended)
const
2194 if (nEvents==0 && (prototype==0 || prototype->
numEntries()==0)) {
2195 return new RooDataSet(
"emptyData",
"emptyData",whatVars) ;
2201 if (resampleProto) {
2202 randProtoOrder=true ;
2205 if (randProtoOrder && prototype && prototype->
numEntries()!=nEvents) {
2206 coutI(
Generation) <<
"RooAbsPdf::generate (Re)randomizing event order in prototype dataset (Nevt=" << nEvents <<
")" << endl ;
2213 generated= context.
generate(nEvents,skipInit,extended);
2216 coutE(
Generation) <<
"RooAbsPdf::generate(" <<
GetName() <<
") do not have a valid generator context" << endl;
2247 Int_t nEvents,
bool verbose,
bool randProtoOrder,
bool resampleProto)
const
2255 coutE(
Generation) <<
"RooAbsPdf::generate(" <<
GetName() <<
") ERROR creating generator context" << endl ;
2271 if (!resampleProto) {
2273 std::iota(lut, lut + nProto, 0);
2279 for (
int i = nProto-1; i > 0; --i) {
2344 if(server == &arg)
continue;
2345 if(server->dependsOn(arg)) {
2385 pc.defineString(
"dsetName",
"Name",0,
"") ;
2386 pc.defineInt(
"verbose",
"Verbose",0,0) ;
2387 pc.defineInt(
"extended",
"Extended",0,0) ;
2388 pc.defineInt(
"nEvents",
"NumEvents",0,0) ;
2389 pc.defineDouble(
"nEventsD",
"NumEventsD",0,-1.) ;
2390 pc.defineInt(
"expectedData",
"ExpectedData",0,0) ;
2393 pc.process(arg1,arg2,arg3,arg4,arg5,arg6) ;
2399 double nEvents =
pc.getDouble(
"nEventsD") ;
2401 nEvents =
pc.getInt(
"nEvents") ;
2404 bool extended =
pc.getInt(
"extended") ;
2405 bool expectedData =
pc.getInt(
"expectedData") ;
2406 const char* dsetName =
pc.getString(
"dsetName") ;
2411 cxcoutI(
Generation) <<
" Extended mode active, number of events generated (" << nEvents <<
") is Poisson fluctuation on "
2412 <<
GetName() <<
"::expectedEvents() = " << nEvents << endl ;
2417 }
else if (nEvents==0) {
2418 cxcoutI(
Generation) <<
"No number of events specified , number of events generated is "
2426 if (dsetName && strlen(dsetName)>0) {
2427 data->SetName(dsetName) ;
2469 coutE(
InputArguments) <<
"RooAbsPdf::generateBinned(" <<
GetName() <<
") ERROR: No event count provided and p.d.f does not provide expected number of events" << endl ;
2475 if (expectedData || extended) {
2487 double histMax(-1) ;
2488 Int_t histOutSum(0) ;
2494 double w=hist->
weight()*nEvents ;
2497 }
else if (extended) {
2507 if (hist->
weight()>histMax) {
2508 histMax = hist->
weight() ;
2511 histOutSum += histOut[i] ;
2516 if (!expectedData && !extended) {
2522 Int_t wgt = (histOutSum>nEvents) ? -1 : 1 ;
2525 std::size_t counter = 0;
2526 bool havePrintedInfo =
false;
2527 while(nEvtExtra>0) {
2530 hist->
get(ibinRand) ;
2533 if (ranY<hist->weight()) {
2535 histOut[ibinRand]++ ;
2538 if (histOut[ibinRand]>0) {
2539 histOut[ibinRand]-- ;
2547 if ((counter++ > 10*nEvents || nEvents > 1.E7) && !havePrintedInfo) {
2548 havePrintedInfo =
true;
2549 coutP(
Generation) <<
"RooAbsPdf::generateBinned(" <<
GetName() <<
") Performing costly accept/reject sampling. If this takes too long, use "
2550 <<
"extended mode to speed up the process." << std::endl;
2557 hist->
set(histOut[i],
sqrt(1.0*histOut[i])) ;
2560 }
else if (expectedData) {
2583 return generate(whatVars,nEvents) ;
2587void removeRangeOverlap(std::vector<std::pair<double, double>>& ranges) {
2589 std::sort(ranges.begin(), ranges.end());
2591 for (
auto it = ranges.begin(); it != ranges.end(); ++it) {
2592 double& startL = it->first;
2593 double& endL = it->second;
2595 for (
auto innerIt = it+1; innerIt != ranges.end(); ++innerIt) {
2596 const double startR = innerIt->first;
2597 const double endR = innerIt->second;
2599 if (startL <= startR && startR <= endL) {
2601 endL = std::max(endL, endR);
2602 *innerIt = make_pair(0., 0.);
2607 auto newEnd = std::remove_if(ranges.begin(), ranges.end(),
2608 [](
const std::pair<double,double>&
input){
2609 return input.first == input.second;
2611 ranges.erase(newEnd, ranges.end());
2729 cmdList.
Add(plotRange) ;
2734 cmdList.
Add(normRange2) ;
2737 if (plotRange || normRange2) {
2738 coutI(
Plotting) <<
"RooAbsPdf::plotOn(" <<
GetName() <<
") p.d.f was fitted in a subrange and no explicit "
2739 << (plotRange?
"Range()":
"") << ((plotRange&&normRange2)?
" and ":
"")
2740 << (normRange2?
"NormRange()":
"") <<
" was specified. Plotting / normalising in fit range. To override, do one of the following"
2741 <<
"\n\t- Clear the automatic fit range attribute: <pdf>.setStringAttribute(\"fitrange\", nullptr);"
2742 <<
"\n\t- Explicitly specify the plotting range: Range(\"<rangeName>\")."
2743 <<
"\n\t- Explicitly specify where to compute the normalisation: NormRange(\"<rangeName>\")."
2744 <<
"\n\tThe default (full) range can be denoted with Range(\"\") / NormRange(\"\")."<< endl ;
2752 pc.defineDouble(
"scaleFactor",
"Normalization",0,1.0) ;
2753 pc.defineInt(
"scaleType",
"Normalization",0,
Relative) ;
2754 pc.defineObject(
"compSet",
"SelectCompSet",0) ;
2755 pc.defineString(
"compSpec",
"SelectCompSpec",0) ;
2756 pc.defineObject(
"asymCat",
"Asymmetry",0) ;
2757 pc.defineDouble(
"rangeLo",
"Range",0,-999.) ;
2758 pc.defineDouble(
"rangeHi",
"Range",1,-999.) ;
2759 pc.defineString(
"rangeName",
"RangeWithName",0,
"") ;
2760 pc.defineString(
"normRangeName",
"NormRange",0,
"") ;
2761 pc.defineInt(
"rangeAdjustNorm",
"Range",0,0) ;
2762 pc.defineInt(
"rangeWNAdjustNorm",
"RangeWithName",0,0) ;
2763 pc.defineMutex(
"SelectCompSet",
"SelectCompSpec") ;
2764 pc.defineMutex(
"Range",
"RangeWithName") ;
2765 pc.allowUndefined() ;
2768 pc.process(cmdList) ;
2775 double scaleFactor =
pc.getDouble(
"scaleFactor") ;
2777 const char* compSpec =
pc.getString(
"compSpec") ;
2779 bool haveCompSel = ( (compSpec && strlen(compSpec)>0) || compSet) ;
2782 std::string nameSuffix ;
2783 if (compSpec && strlen(compSpec)>0) {
2784 nameSuffix.append(
"_Comp[") ;
2785 nameSuffix.append(compSpec) ;
2786 nameSuffix.append(
"]") ;
2787 }
else if (compSet) {
2788 nameSuffix.append(
"_Comp[") ;
2790 nameSuffix.append(
"]") ;
2794 pc.stripCmdList(cmdList,
"SelectCompSet,SelectCompSpec") ;
2798 RooCmdArg cnsuffix(
"CurveNameSuffix",0,0,0,0,nameSuffix.c_str(),0,0,0) ;
2799 cmdList.
Add(&cnsuffix);
2804 double nExpected(1) ;
2808 <<
"): ERROR the 'Expected' scale option can only be used on extendable PDFs" << endl ;
2819 bool hasCustomRange(
false), adjustNorm(
false) ;
2821 std::vector<pair<double,double> > rangeLim;
2824 if (
pc.hasProcessed(
"Range")) {
2826 double rangeLo =
pc.getDouble(
"rangeLo") ;
2827 double rangeHi =
pc.getDouble(
"rangeHi") ;
2828 rangeLim.push_back(make_pair(rangeLo,rangeHi)) ;
2829 adjustNorm =
pc.getInt(
"rangeAdjustNorm") ;
2830 hasCustomRange = true ;
2833 << rangeLo <<
"," << rangeHi <<
"]" ;
2834 if (!
pc.hasProcessed(
"NormRange")) {
2835 ccoutI(
Plotting) <<
", curve is normalized to data in " << (adjustNorm?
"given":
"full") <<
" range" << endl ;
2840 nameSuffix.append(
Form(
"_Range[%f_%f]",rangeLo,rangeHi)) ;
2842 }
else if (
pc.hasProcessed(
"RangeWithName")) {
2844 for (
const std::string& rangeNameToken :
ROOT::Split(
pc.getString(
"rangeName",
"",
false),
",")) {
2845 const char* thisRangeName = rangeNameToken.empty() ? nullptr : rangeNameToken.c_str();
2847 coutE(
Plotting) <<
"Range '" << rangeNameToken <<
"' not defined for variable '"
2853 adjustNorm =
pc.getInt(
"rangeWNAdjustNorm") ;
2854 hasCustomRange = true ;
2856 coutI(
Plotting) <<
"RooAbsPdf::plotOn(" <<
GetName() <<
") only plotting range '" <<
pc.getString(
"rangeName",
"",
false) <<
"'" ;
2857 if (!
pc.hasProcessed(
"NormRange")) {
2858 ccoutI(
Plotting) <<
", curve is normalized to data in " << (adjustNorm?
"given":
"full") <<
" range" << endl ;
2863 nameSuffix.append(
Form(
"_Range[%s]",
pc.getString(
"rangeName"))) ;
2866 if (
pc.hasProcessed(
"NormRange")) {
2868 for (
const auto& rangeNameToken :
ROOT::Split(
pc.getString(
"normRangeName",
"",
false),
",")) {
2869 const char* thisRangeName = rangeNameToken.empty() ? nullptr : rangeNameToken.c_str();
2871 coutE(
Plotting) <<
"Range '" << rangeNameToken <<
"' not defined for variable '"
2878 hasCustomRange = true ;
2879 coutI(
Plotting) <<
"RooAbsPdf::plotOn(" <<
GetName() <<
") p.d.f. curve is normalized using explicit choice of ranges '" <<
pc.getString(
"normRangeName",
"",
false) <<
"'" << endl ;
2881 nameSuffix.append(
Form(
"_NormRange[%s]",
pc.getString(
"rangeName"))) ;
2885 if (hasCustomRange && adjustNorm) {
2887 const std::size_t oldSize = rangeLim.size();
2888 removeRangeOverlap(rangeLim);
2890 if (oldSize != rangeLim.size() && !
pc.hasProcessed(
"NormRange")) {
2894 coutE(
Plotting) <<
"Requested plot/integration ranges overlap. For correct plotting, new ranges "
2895 "will be defined." << std::endl;
2898 std::string rangesNoOverlap;
2899 for (
auto it = rangeLim.begin(); it != rangeLim.end(); ++it) {
2900 std::stringstream rangeName;
2901 rangeName <<
"Remove_overlap_range_" << it - rangeLim.begin();
2902 plotVar->setRange(rangeName.str().c_str(), it->first, it->second);
2903 if (!rangesNoOverlap.empty())
2904 rangesNoOverlap +=
",";
2905 rangesNoOverlap += rangeName.str();
2910 rangeArg->
setString(0, rangesNoOverlap.c_str());
2913 cmdList.
Add(plotRange);
2917 double rangeNevt(0) ;
2918 for (
const auto& riter : rangeLim) {
2923 scaleFactor *= rangeNevt/nExpected ;
2929 scaleFactor *= nExpected ;
2931 scaleFactor /= nExpected ;
2950 for (
const auto arg : branchNodeSet) {
2952 branchNodeSet.
remove(*arg) ;
2963 if (dirSelNodes->
getSize()>0) {
2964 coutI(
Plotting) <<
"RooAbsPdf::plotOn(" <<
GetName() <<
") directly selected PDF components: " << *dirSelNodes << endl ;
2970 coutE(
Plotting) <<
"RooAbsPdf::plotOn(" <<
GetName() <<
") ERROR: component selection set " << *compSet <<
" does not match any components of p.d.f." << endl ;
2972 coutE(
Plotting) <<
"RooAbsPdf::plotOn(" <<
GetName() <<
") ERROR: component selection expression '" << compSpec <<
"' does not select any components of p.d.f." << endl ;
2977 delete dirSelNodes ;
2981 RooCmdArg cnsuffix(
"CurveNameSuffix",0,0,0,0,nameSuffix.c_str(),0,0,0) ;
2982 cmdList.
Add(&cnsuffix);
3020 double nExpected(1) ;
3024 <<
"): ERROR the 'Expected' scale option can only be used on extendable PDFs" << endl ;
3092 pc.defineString(
"label",
"Label",0,
"") ;
3093 pc.defineDouble(
"xmin",
"Layout",0,0.65) ;
3094 pc.defineDouble(
"xmax",
"Layout",1,0.9) ;
3095 pc.defineInt(
"ymaxi",
"Layout",0,
Int_t(0.9*10000)) ;
3096 pc.defineInt(
"showc",
"ShowConstants",0,0) ;
3097 pc.defineObject(
"params",
"Parameters",0,0) ;
3098 pc.defineString(
"formatStr",
"Format",0,
"NELU") ;
3099 pc.defineInt(
"sigDigit",
"Format",0,2) ;
3100 pc.defineInt(
"dummy",
"FormatArgs",0,0) ;
3101 pc.defineMutex(
"Format",
"FormatArgs") ;
3104 pc.process(cmdList) ;
3109 const char* label =
pc.getString(
"label") ;
3110 double xmin =
pc.getDouble(
"xmin") ;
3111 double xmax =
pc.getDouble(
"xmax") ;
3112 double ymax =
pc.getInt(
"ymaxi") / 10000. ;
3113 Int_t showc =
pc.getInt(
"showc") ;
3116 const char* formatStr =
pc.getString(
"formatStr") ;
3117 Int_t sigDigit =
pc.getInt(
"sigDigit") ;
3123 if (
pc.hasProcessed(
"FormatArgs")) {
3131 std::unique_ptr<RooArgSet> selParams{
static_cast<RooArgSet*
>(pdfParams->selectCommon(*params))} ;
3132 if (
pc.hasProcessed(
"FormatArgs")) {
3178 bool showLabel= (label != 0 && strlen(label) > 0);
3183 for (
const auto param : params) {
3185 if(showConstants || !var->isConstant())
ymin-= dy;
3188 std::string labelString = label;
3189 unsigned int numLines = std::count(labelString.begin(), labelString.end(),
'\n') + 1;
3190 if (showLabel)
ymin -= numLines * dy;
3196 box->SetFillColor(0);
3197 box->SetBorderSize(0);
3198 box->SetTextAlign(12);
3199 box->SetTextSize(0.04F);
3200 box->SetFillStyle(0);
3202 for (
const auto param : params) {
3203 auto var =
static_cast<const RooRealVar*
>(param);
3204 if(var->isConstant() && !showConstants)
continue;
3206 TString *formatted= options ? var->format(sigDigits, options) : var->format(*formatCmd) ;
3207 box->AddText(formatted->
Data());
3269 pdfOwner->
_norm = 0 ;
3285 name.append(
"_Proj[") ;
3288 for(
auto const& arg : iset) {
3294 name.append(arg->GetName()) ;
3344 pc.defineObject(
"supNormSet",
"SupNormSet",0,0) ;
3345 pc.defineInt(
"numScanBins",
"ScanParameters",0,1000) ;
3346 pc.defineInt(
"intOrder",
"ScanParameters",1,2) ;
3347 pc.defineInt(
"doScanNum",
"ScanNumCdf",0,1) ;
3348 pc.defineInt(
"doScanAll",
"ScanAllCdf",0,0) ;
3349 pc.defineInt(
"doScanNon",
"ScanNoCdf",0,0) ;
3350 pc.defineMutex(
"ScanNumCdf",
"ScanAllCdf",
"ScanNoCdf") ;
3353 pc.process(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) ;
3364 Int_t numScanBins =
pc.getInt(
"numScanBins") ;
3365 Int_t intOrder =
pc.getInt(
"intOrder") ;
3366 Int_t doScanNum =
pc.getInt(
"doScanNum") ;
3367 Int_t doScanAll =
pc.getInt(
"doScanAll") ;
3368 Int_t doScanNon =
pc.getInt(
"doScanNon") ;
3379 Int_t isNum= (tmp->numIntRealVars().getSize()>0) ;
3382 coutI(
NumIntegration) <<
"RooAbsPdf::createCdf(" <<
GetName() <<
") integration over observable(s) " << iset <<
" involves numeric integration," << endl
3383 <<
" constructing cdf though numeric integration of sampled pdf in " << numScanBins <<
" bins and applying order "
3384 << intOrder <<
" interpolation on integrated histogram." << endl
3385 <<
" To override this choice of technique use argument ScanNone(), to change scan parameters use ScanParameters(nbins,order) argument" << endl ;
3397 ivar->
setBins(numScanBins,
"numcdf") ;
3415 for (
const auto arg : *comps) {
3416 auto pdf =
dynamic_cast<const RooAbsPdf*
>(arg) ;
3418 std::unique_ptr<RooArgSet> compRet(pdf->
getConstraints(observables,constrainedParams,stripDisconnected));
3420 ret->
add(*compRet,
false) ;
3473 if (config)
return config ;
3511 delete _genContext ;
3518 bool extended,
bool randProto,
bool resampleProto,
TString dsetName,
bool init) :
3519 _genContext(context), _whatVars(whatVars), _protoData(protoData), _nGen(nGen), _extended(extended),
3520 _randProto(randProto), _resampleProto(resampleProto), _dsetName(dsetName), _init(
init)
header file containing the templated implementation of matrix inversion routines for use with ROOT's ...
static void indent(ostringstream &buf, int indent_level)
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 input
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.
class to compute the Cholesky decomposition of a matrix
bool Invert(M &m) const
place the inverse into m
RooAbsArg is the common abstract base class for objects that represent a value and a "shape" in RooFi...
void clearValueAndShapeDirty() const
TObject * Clone(const char *newname=0) const override
Make a clone of an object using the Streamer facility.
RooWorkspace * _myws
Prevent 'AlwaysDirty' mode for this node.
void setOperMode(OperMode mode, bool recurseADirty=true)
Set the operation mode of this node.
void setStringAttribute(const Text_t *key, const Text_t *value)
Associate string 'value' to this object under key 'key'.
RooArgSet * getObservables(const RooArgSet &set, bool valueOnly=true) const
Given a set of possible observables, return the observables that this PDF depends on.
void Print(Option_t *options=0) const override
Print the object to the defaultPrintStream().
bool addOwnedComponents(const RooAbsCollection &comps)
Take ownership of the contents of 'comps'.
const Text_t * getStringAttribute(const Text_t *key) const
Get string attribute mapped under key 'key'.
bool dependsOn(const RooAbsCollection &serverList, const RooAbsArg *ignoreArg=0, bool valueOnly=false) const
Test whether we depend on (ie, are served by) any object in the specified collection.
RooArgSet * getVariables(bool stripDisconnected=true) const
Return RooArgSet with all variables (tree leaf nodes of expresssion tree)
bool getAttribute(const Text_t *name) const
Check if a named attribute is set. By default, all attributes are unset.
bool isValueDirty() const
virtual void applyWeightSquared(bool flag)
Disables or enables the usage of squared weights.
void setProxyNormSet(const RooArgSet *nset)
Forward a change in the cached normalization argset to all the registered proxies.
friend class RooProjectedPdf
RefCountList_t _serverList
RooArgSet * getComponents() const
Create a RooArgSet with all components (branch nodes) of the expression tree headed by this object.
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...
void branchNodeServerList(RooAbsCollection *list, const RooAbsArg *arg=0, bool recurseNonDerived=false) const
Fill supplied list with all branch nodes of the arg tree starting with ourself as top node.
RooAbsArg * findServer(const char *name) const
Return server of this with name name. Returns nullptr if not found.
OperMode operMode() const
Query the operation mode of this node.
RooAbsArg * _owner
! Pointer to owning RooAbsArg
void setInterpolationOrder(Int_t order)
Set interpolation order of RooHistFunct representing cache histogram.
RooAbsCategoryLValue is the common abstract base class for objects that represent a discrete value th...
RooAbsCollection * selectByAttrib(const char *name, bool value) const
Create a subset of the current collection, consisting only of those elements with the specified attri...
virtual bool addOwned(RooAbsArg &var, bool silent=false)
Add an argument and transfer the ownership to the collection.
virtual bool remove(const RooAbsArg &var, bool silent=false, bool matchByNameOnly=false)
Remove the specified argument from our list.
void Print(Option_t *options=0) const override
This method must be overridden when a class wants to print itself.
Int_t getSize() const
Return the number of elements in the collection.
virtual bool add(const RooAbsArg &var, bool silent=false)
Add the specified argument to list.
void assign(const RooAbsCollection &other) const
Sets the value, cache and constant attribute of any argument in our set that also appears in the othe...
RooAbsArg * first() const
RooAbsCollection * selectByName(const char *nameList, bool verbose=false) const
Create a subset of the current collection, consisting only of those elements with names matching the ...
bool selectCommon(const RooAbsCollection &refColl, RooAbsCollection &outColl) const
Create a subset of the current collection, consisting only of those elements that are contained as we...
std::string contentsString() const
Return comma separated list of contained object names as STL string.
TIterator * createIterator(bool dir=kIterForward) const
TIterator-style iteration over contained elements.
RooAbsArg * find(const char *name) const
Find object with given name in list.
RooAbsData is the common abstract base class for binned and unbinned datasets.
virtual const RooArgSet * get() const
virtual Int_t numEntries() const
Return number of entries in dataset, i.e., count unweighted entries.
RooAbsGenContext is the abstract base class for generator contexts of RooAbsPdf objects.
virtual void setExpectedData(bool)
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.
~CacheElem() override
Destructor of normalization cache element.
RooAbsGenContext * _genContext
GenSpec * prepareMultiGen(const RooArgSet &whatVars, const RooCmdArg &arg1=RooCmdArg::none(), const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none())
Prepare GenSpec configuration object for efficient generation of multiple datasets from identical spe...
virtual double getLogVal(const RooArgSet *set=0) const
Return the log of the current value with given normalization An error message is printed if the argum...
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...
int calcSumW2CorrectedCovariance(RooMinimizer &minimizer, RooAbsReal &nll) const
Apply correction to errors and covariance matrix.
double getNorm(const RooArgSet &nset) const
Get normalisation term needed to normalise the raw values returned by getVal().
RooObjCacheManager _normMgr
friend class CacheElem
The cache manager.
RooAbsReal * createChi2(RooDataHist &data, const RooCmdArg &arg1=RooCmdArg::none(), const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none()) override
Create a from a histogram and this function.
bool _selectComp
Component selection flag for RooAbsPdf::plotCompOn.
virtual void generateEvent(Int_t code)
Interface for generation of an event using the algorithm corresponding to the specified code.
void logBatchComputationErrors(RooSpan< const double > &outputs, std::size_t begin) const
Scan through outputs and fix+log all nans and negative values.
RooSpan< const double > getLogProbabilities(RooBatchCompute::RunContext &evalData, const RooArgSet *normSet=nullptr) const
Compute the log-likelihoods for all events in the requested batch.
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.
virtual double expectedEvents(const RooArgSet *nset) const
Return expected number of events to be used in calculation of extended likelihood.
virtual RooAbsReal * createNLL(RooAbsData &data, const RooLinkedList &cmdList)
Construct representation of -log(L) of PDFwith given dataset.
virtual RooAbsGenContext * binnedGenContext(const RooArgSet &vars, bool verbose=false) const
Return a binned generator context.
RooAbsReal * createScanCdf(const RooArgSet &iset, const RooArgSet &nset, Int_t numScanBins, Int_t intOrder)
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)
double extendedTerm(double sumEntries, const RooArgSet *nset, double sumEntriesW2=0.0) const
Return the extended likelihood term ( ) of this PDF for the given number of observed events.
~RooAbsPdf() override
Destructor.
TClass * IsA() const override
virtual RooFitResult * fitTo(RooAbsData &data, const RooCmdArg &arg1=RooCmdArg::none(), const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none())
Fit PDF to given dataset.
RooArgSet const * _normSet
Normalization integral (owned by _normMgr)
RooFitResult * chi2FitTo(RooDataHist &data, const RooLinkedList &cmdList) override
Calls RooAbsPdf::createChi2(RooDataSet& data, const RooLinkedList& cmdList) and returns fit result.
RooNumGenConfig * specialGeneratorConfig() const
Returns the specialized integrator configuration for this RooAbsReal.
virtual RooAbsGenContext * autoGenContext(const RooArgSet &vars, const RooDataSet *prototype=0, const RooArgSet *auxProto=0, bool verbose=false, bool autoBinned=true, const char *binnedTag="") const
virtual RooPlot * paramOn(RooPlot *frame, const RooCmdArg &arg1=RooCmdArg::none(), const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none())
Add a box with parameter values (and errors) to the specified frame.
double analyticalIntegralWN(Int_t code, const RooArgSet *normSet, const char *rangeName=0) const override
Analytical integral with normalization (see RooAbsReal::analyticalIntegralWN() for further informatio...
RooDataSet * generate(const RooArgSet &whatVars, Int_t nEvents, const RooCmdArg &arg1, const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none())
See RooAbsPdf::generate(const RooArgSet&,const RooCmdArg&,const RooCmdArg&,const RooCmdArg&,...
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.
RooSpan< const double > getValues(RooBatchCompute::RunContext &evalData, const RooArgSet *normSet) const override
Compute batch of values for given input data, and normalise by integrating over the observables in no...
virtual RooDataHist * generateBinned(const RooArgSet &whatVars, double nEvents, const RooCmdArg &arg1, const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none()) const
As RooAbsPdf::generateBinned(const RooArgSet&, const RooCmdArg&,const RooCmdArg&, const RooCmdArg&,...
Int_t _traceCount
Number of traces remaining to print.
bool canBeExtended() const
If true, PDF can provide extended likelihood term.
int calcAsymptoticCorrectedCovariance(RooMinimizer &minimizer, RooAbsData const &data)
Use the asymptotically correct approach to estimate errors in the presence of weights.
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...
Int_t _errorCount
Number of errors remaining to print.
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.
virtual const RooAbsReal * getNormObj(const RooArgSet *set, const RooArgSet *iset, const TNamed *rangeName=0) const
Return pointer to RooAbsReal object that implements calculation of integral over observables iset in ...
Int_t _negCount
Number of negative probablities remaining to print.
std::unique_ptr< RooFitResult > minimizeNLL(RooAbsReal &nll, RooAbsData const &data, MinimizerConfig const &cfg)
Minimizes a given NLL variable by finding the optimal parameters with the RooMinimzer.
void setNormRangeOverride(const char *rangeName)
virtual 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
double getValV(const RooArgSet *set=0) const override
Return current value, normalized by integrating over the observables in nset.
virtual RooArgSet * getAllConstraints(const RooArgSet &observables, RooArgSet &constrainedParams, bool stripDisconnected=true) 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.
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.
RooNumGenConfig * _specGeneratorConfig
! MC generator configuration specific for this object
void printValue(std::ostream &os) const override
Print value of p.d.f, also print normalization integral that was last used, if any.
virtual RooArgSet * getConstraints(const RooArgSet &, RooArgSet &, bool) const
static TString _normRangeOverride
static Int_t _verboseEval
virtual RooAbsGenContext * genContext(const RooArgSet &vars, const RooDataSet *prototype=0, const RooArgSet *auxProto=0, bool verbose=false) const
Interface function to create a generator context from a p.d.f.
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.
RooPlot * plotOn(RooPlot *frame, const RooCmdArg &arg1=RooCmdArg::none(), const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none(), const RooCmdArg &arg9=RooCmdArg::none(), const RooCmdArg &arg10=RooCmdArg::none()) const override
Helper calling plotOn(RooPlot*, RooLinkedList&) const.
std::pair< double, double > getRange(const char *name=0) const
Get low and high bound of the variable.
bool hasRange(const char *name) const override
Check if variable has a binning with given name.
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
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.
double getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
virtual double analyticalIntegral(Int_t code, const char *rangeName=0) const
Implements the actual analytical integral(s) advertised by getAnalyticalIntegral.
RooAbsReal * createIntegral(const RooArgSet &iset, const RooCmdArg &arg1, const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none()) const
Create an object that represents the integral of the function over one or more observables listed in ...
bool plotSanityChecks(RooPlot *frame) const
Utility function for plotOn(), perform general sanity check on frame to ensure safe plotting operatio...
RooDerivative * derivative(RooRealVar &obs, Int_t order=1, double eps=0.001)
Return function representing first, second or third order derivative of this function.
RooAbsReal * createIntRI(const RooArgSet &iset, const RooArgSet &nset=RooArgSet())
Utility function for createRunningIntegral.
virtual RooPlot * plotOn(RooPlot *frame, const RooCmdArg &arg1=RooCmdArg(), const RooCmdArg &arg2=RooCmdArg(), const RooCmdArg &arg3=RooCmdArg(), const RooCmdArg &arg4=RooCmdArg(), const RooCmdArg &arg5=RooCmdArg(), const RooCmdArg &arg6=RooCmdArg(), const RooCmdArg &arg7=RooCmdArg(), const RooCmdArg &arg8=RooCmdArg(), const RooCmdArg &arg9=RooCmdArg(), const RooCmdArg &arg10=RooCmdArg()) const
Plot (project) PDF on specified frame.
RooFitResult * chi2FitDriver(RooAbsReal &fcn, RooLinkedList &cmdList)
Internal driver function for chi2 fits.
virtual RooSpan< const double > getValues(RooBatchCompute::RunContext &evalData, const RooArgSet *normSet=nullptr) const
void printMultiline(std::ostream &os, Int_t contents, bool verbose=false, TString indent="") const override
Structure printing.
double _value
Cache for current value of object.
static void setEvalErrorLoggingMode(ErrorLoggingMode m)
Set evaluation error logging mode.
virtual double evaluate() const =0
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
const RooNumIntConfig * getIntegratorConfig() const
Return the numeric integration configuration used for this object.
TString integralNameSuffix(const RooArgSet &iset, const RooArgSet *nset=0, const char *rangeName=0, bool omitEmpty=false) const
Construct string with unique suffix name to give to integral object that encodes integrated observabl...
virtual bool isBinnedDistribution(const RooArgSet &) const
Tests if the distribution is binned. Unless overridden by derived classes, this always returns false.
void logEvalError(const char *message, const char *serverValueString=0) const
Log evaluation error message.
RooAddition calculates the sum of a set of RooAbsReal terms, or when constructed with two sets,...
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooAbsArg * at(Int_t idx) const
Return object at given index, or nullptr if index is out of range.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
RooBinnedGenContext is an efficient implementation of the generator context specific for binned pdfs.
T * getObj(const RooArgSet *nset, Int_t *sterileIndex=0, const TNamed *isetRangeName=0)
Getter function without integration set.
Int_t setObj(const RooArgSet *nset, T *obj, const TNamed *isetRangeName=0)
Setter function without integration set.
RooCachedReal is an implementation of RooAbsCachedReal that can cache any external RooAbsReal input f...
void setCacheSource(bool flag)
RooChi2Var implements a simple calculation from a binned dataset and a PDF.
RooCmdArg is a named container for two doubles, two integers two object points and three string point...
void setInt(Int_t idx, Int_t value)
void setString(Int_t idx, const char *value)
Class RooCmdConfig is a configurable parser for RooCmdArg named arguments.
bool process(const RooCmdArg &arg)
Process given RooCmdArg.
Int_t getInt(const char *name, Int_t defaultValue=0)
Return integer property registered with name 'name'.
bool defineInt(const char *name, const char *argName, Int_t intNum, Int_t 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.
static std::unique_ptr< RooAbsReal > createConstraintTerm(std::string const &name, RooAbsPdf const &pdf, RooAbsData const &data, RooArgSet const *constrainedParameters, RooArgSet const *externalConstraints, RooArgSet const *globalObservables, const char *globalObservablesTag, bool takeGlobalObservablesFromData, bool cloneConstraints, RooWorkspace *workspace)
Create the parameter constraint sum to add to the negative log-likelihood.
The RooDataHist is a container class to hold N-dimensional binned data.
double weight(std::size_t i) const
Return weight of i-th bin.
void set(std::size_t binNumber, double weight, double wgtErr)
Set bin content of bin that was last loaded with get(std::size_t).
Int_t numEntries() const override
Return the number of bins.
const RooArgSet * get() const override
Get bin centre of current bin.
double sumEntries() const override
Sum the weights of all bins.
RooDataSet is a container class to hold unbinned data.
void add(const RooArgSet &row, double weight=1.0, double weightError=0) override
Add one ore more rows of data.
RooFitResult is a container class to hold the input and output of a PDF fit to a dataset.
Class RooGenContext implement a universal generator context for all RooAbsPdf classes that do not hav...
Switches the message service to a different level while the instance is alive.
RooLinkedList is an collection class for internal use, storing a collection of RooAbsArg pointers in ...
virtual void Add(TObject *arg)
TObject * FindObject(const char *name) const override
Return pointer to obejct with given name.
RooMinimizer is a wrapper class around ROOT::Fit:Fitter that provides a seamless interface between th...
RooFitResult * save(const char *name=0, const char *title=0)
Save and return a RooFitResult snapshot of current minimizer status.
int hesse()
Execute HESSE.
void applyCovarianceMatrix(TMatrixDSym const &V)
Apply results of given external covariance matrix.
Class RooNLLVar implements a -log(likelihood) calculation from a dataset and a PDF.
void batchMode(bool on=true)
static const char * str(const TNamed *ptr)
Return C++ string corresponding to given TNamed pointer.
Class RooNumCdf is an implementation of RooNumRunningInt specialized to calculate cumulative distribu...
RooNumGenConfig holds the configuration parameters of the various numeric integrators used by RooReal...
static RooNumGenConfig & defaultConfig()
Return reference to instance of default numeric integrator configuration object.
void sterilize() override
Clear the cache payload but retain slot mapping w.r.t to normalization and integration sets.
A RooPlot is a 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,...
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.
RooRealIntegral performs hybrid numerical/analytical integrals of RooAbsReal objects.
RooRealVar represents a variable that can be changed from the outside.
void setBins(Int_t nBins, const char *name=0)
Create a uniform binning under name 'name' for this variable.
void setRange(const char *name, double min, double max)
Set a fit or plotting range.
A simple container to hold a batch of data values.
constexpr std::span< T >::pointer data() const
constexpr std::span< T >::index_type size() const noexcept
RooXYChi2Var implements a simple chi^2 calculation from an unbinned dataset with values x,...
Iterator abstract base class.
virtual TObject * Next()=0
TMatrixTSym< Element > & Similarity(const TMatrixT< Element > &n)
Calculate B * (*this) * B^T , final matrix will be (nrowsb x nrowsb) This is a similarity transform w...
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.
Mother of all ROOT objects.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
A Pave (see TPave) with text, lines or/and boxes inside.
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 ].
void ToLower()
Change string to lower-case.
void Clear()
Clear string without changing its capacity.
const char * Data() const
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
RooCmdArg SupNormSet(const RooArgSet &nset)
RooCmdArg WeightVar(const char *name, bool reinterpretAsWeight=false)
RooCmdArg Hesse(bool flag=true)
RooCmdArg PrintLevel(Int_t code)
RooCmdArg NormRange(const char *rangeNameList)
RooCmdArg Range(const char *rangeName, bool adjustNorm=true)
RooCmdArg Normalization(double scaleFactor)
RVec< PromoteType< T > > abs(const RVec< T > &v)
RVec< PromoteType< T > > round(const RVec< T > &v)
RVec< PromoteType< T > > log(const RVec< T > &v)
void swap(RDirectoryEntry &e1, RDirectoryEntry &e2) noexcept
VecExpr< UnaryOp< Sqrt< T >, VecExpr< A, T, D >, T >, T, D > sqrt(const VecExpr< A, T, D > &rhs)
VecExpr< UnaryOp< Fabs< T >, VecExpr< A, T, D >, T >, T, D > fabs(const VecExpr< A, T, D > &rhs)
std::vector< std::string > Split(std::string_view str, std::string_view delims, bool skipEmpty=false)
Splits a string at each character in delims.
void init()
Inspect hardware capabilities, and load the optimal library for RooFit computations.
__roodevice__ double fast_log(double x)
std::unique_ptr< RooAbsReal > createNLL(RooAbsPdf &pdf, RooAbsData &data, std::unique_ptr< RooAbsReal > &&constraints, std::string const &rangeName, std::string const &addCoefRangeName, RooArgSet const &projDeps, bool isExtended, double integrateOverBinsPrecision, RooFit::BatchModeOption batchMode)
BatchModeOption
For setting the batch mode flag with the BatchMode() command argument to RooAbsPdf::fitTo();.
UniqueId< Class > const & getUniqueId(Class const *ptr)
A helper function to replace pointer comparisons with UniqueId comparisons.
bool checkIfRangesOverlap(RooAbsPdf const &pdf, RooAbsData const &data, std::vector< std::string > const &rangeNames)
Check if there is any overlap when a list of ranges is applied to a set of observables.
RooArgSet selectFromArgSet(RooArgSet const &, std::string const &names)
Construct a RooArgSet of objects in a RooArgSet whose names match to those in the names string.
std::string getColonSeparatedNameString(RooArgSet const &argSet)
Create a string with all sorted names of RooArgSet elements separated by colons.
static constexpr double pc
Double_t QuietNaN()
Returns a quiet NaN as defined by IEEE 754
Configuration struct for RooAbsPdf::minimizeNLL with all the default.
const RooArgSet * minosSet
std::string rangeName
Stores the configuration parameters for RooAbsTestStatistic.
std::string addCoefRangeName
bool takeGlobalObservablesFromData
double integrateOverBinsPrecision
RooFit::MPSplit interleave
This struct enables passing computation data around between elements of a computation graph.
std::vector< double > logProbabilities
Possibility to register log probabilities.
static double packFloatIntoNaN(float payload)
Pack float into mantissa of a NaN.