|
ROOT
Reference Guide |
|
Go to the documentation of this file.
218 RooAbsReal(
name,title), _norm(0), _normSet(0), _normMgr(this,10), _selectComp(
kTRUE), _specGeneratorConfig(0)
231 RooAbsReal(
name,title,plotMin,plotMax), _norm(0), _normSet(0), _normMgr(this,10), _selectComp(
kTRUE), _specGeneratorConfig(0)
244 _normMgr(other._normMgr,this), _selectComp(other._selectComp), _normRange(other._normRange)
246 resetErrorCounters() ;
252 _specGeneratorConfig = 0 ;
308 if (normVal < 0. || (normVal == 0. && rawVal != 0)) {
310 const std::string msg =
"p.d.f normalization integral is zero or negative: " + std::to_string(normVal);
317 logEvalError(
Form(
"p.d.f value is less than zero (%f), trying to recover", rawVal));
328 _value = (rawVal == 0. && normVal == 0.) ? 0. : rawVal / normVal;
352 auto item = evalData.
spans.find(
this);
353 if (item != evalData.
spans.end()) {
358 assert(evalData.
spans.count(
this) > 0);
360 if (normSet !=
nullptr) {
368 || (normVal == 0. && std::any_of(outputs.begin(), outputs.end(), [](
double val){return val != 0;}))) {
370 "\n\tInt(%s) = %f",
GetName(), normVal));
373 if (normVal != 1. && normVal > 0.) {
374 const double invNorm = 1./normVal;
375 for (
double& val : outputs) {
393 cxcoutD(
Eval) <<
"RooAbsPdf::analyticalIntegralWN(" <<
GetName() <<
") code = " << code <<
" normset = " << (normSet?*normSet:
RooArgSet()) << endl ;
396 if (code==0)
return getVal(normSet) ;
416 logEvalError(
Form(
"p.d.f value is Not-a-Number (%f), forcing value to zero",value)) ;
420 logEvalError(
Form(
"p.d.f value is less than zero (%f), forcing value to zero",value)) ;
425 if(!error)
return error ;
448 if (!nset)
return 1 ;
456 coutW(
Eval) <<
"RooAbsPdf::getNorm(" <<
GetName() <<
":: WARNING normalization is zero, nset = " ; nset->
Print(
"1") ;
476 return cache->
_norm ;
522 if (nsetChanged && adjustProxies) {
532 ((
RooAbsPdf*)
this)->setProxyNormSet(nset) ;
540 <<
") recreating normalization integral " << endl ;
543 cxcoutD(
Tracing) << IsA()->GetName() <<
"::syncNormalization(" <<
GetName() <<
") selfNormalized, creating unit norm" << endl;
561 if (cacheParamsStr && strlen(cacheParamsStr)) {
569 if (cacheParams->
getSize()>0) {
571 <<
"-dim value cache for integral over " << *depList <<
" as a function of " << *cacheParams <<
" in range " << (nr?nr:
"<default>") << endl ;
580 normInt= cachedIntegral ;
646 if (
fabs(prob)>1e6) {
647 coutW(
Eval) <<
"RooAbsPdf::getLogVal(" <<
GetName() <<
") WARNING: large likelihood 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") ;
677 bool 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",
724 auto pdfValues =
getValues(evalData, normSet);
726 if (checkInfNaNNeg(pdfValues)) {
733 for (std::size_t i = 0; i < pdfValues.size(); ++i) {
734 const double prob = pdfValues[i];
739 theLog = std::numeric_limits<double>::quiet_NaN();
741 theLog = -std::numeric_limits<double>::infinity();
776 if (
fabs(expected)<1
e-10 &&
fabs(observed)<1
e-10) {
782 logEvalError(
"extendedTerm #expected events is <0 or NaN") ;
813 << observed <<
" events. extendedTerm = " << extra << endl;
913 pc.defineString(
"rangeName",
"RangeWithName",0,
"",
kTRUE) ;
914 pc.defineString(
"addCoefRange",
"SumCoefRange",0,
"") ;
915 pc.defineString(
"globstag",
"GlobalObservablesTag",0,
"") ;
916 pc.defineDouble(
"rangeLo",
"Range",0,-999.) ;
917 pc.defineDouble(
"rangeHi",
"Range",1,-999.) ;
918 pc.defineInt(
"splitRange",
"SplitRange",0,0) ;
919 pc.defineInt(
"ext",
"Extended",0,2) ;
920 pc.defineInt(
"numcpu",
"NumCPU",0,1) ;
921 pc.defineInt(
"interleave",
"NumCPU",1,0) ;
922 pc.defineInt(
"verbose",
"Verbose",0,0) ;
923 pc.defineInt(
"optConst",
"Optimize",0,0) ;
924 pc.defineInt(
"cloneData",
"CloneData", 0, 2);
925 pc.defineSet(
"projDepSet",
"ProjectedObservables",0,0) ;
926 pc.defineSet(
"cPars",
"Constrain",0,0) ;
927 pc.defineSet(
"glObs",
"GlobalObservables",0,0) ;
929 pc.defineInt(
"doOffset",
"OffsetLikelihood",0,0) ;
930 pc.defineSet(
"extCons",
"ExternalConstraints",0,0) ;
931 pc.defineInt(
"BatchMode",
"BatchMode", 0, 0);
932 pc.defineDouble(
"IntegrateBins",
"IntegrateBins", 0, -1.);
933 pc.defineMutex(
"Range",
"RangeWithName") ;
935 pc.defineMutex(
"GlobalObservables",
"GlobalObservablesTag") ;
938 pc.process(cmdList) ;
944 const char* rangeName =
pc.getString(
"rangeName",0,
kTRUE) ;
945 const char* addCoefRangeName =
pc.getString(
"addCoefRange",0,
kTRUE) ;
946 const char* globsTag =
pc.getString(
"globstag",0,
kTRUE) ;
948 Int_t numcpu =
pc.getInt(
"numcpu") ;
949 Int_t numcpu_strategy =
pc.getInt(
"interleave");
951 if (numcpu_strategy==3 && !this->
InheritsFrom(
"RooSimultaneous") ) {
952 coutW(
Minimization) <<
"Cannot use a NumCpu Strategy = 3 when the pdf is not a RooSimultaneus, "
953 "falling back to default strategy = 0" << endl;
958 Int_t splitr =
pc.getInt(
"splitRange") ;
960 Int_t optConst =
pc.getInt(
"optConst") ;
961 Int_t cloneData =
pc.getInt(
"cloneData") ;
962 Int_t doOffset =
pc.getInt(
"doOffset") ;
966 cloneData = optConst ;
972 if (
pc.hasProcessed(
"GlobalObservablesTag")) {
973 if (glObs)
delete glObs ;
976 coutI(
Minimization) <<
"User-defined specification of global observables definition with tag named '" << globsTag <<
"'" << endl ;
978 }
else if (!
pc.hasProcessed(
"GlobalObservables")) {
984 coutI(
Minimization) <<
"p.d.f. provides built-in specification of global observables definition with tag named '" << defGlobObsTag <<
"'" << endl ;
985 if (glObs)
delete glObs ;
999 doStripDisconnected=
kTRUE ;
1007 coutI(
Minimization) <<
"p.d.f. provides expected number of events, including extended term in likelihood." << endl ;
1014 if (
pc.hasProcessed(
"Range")) {
1020 for (
auto arg : *obs) {
1022 if (rrv) rrv->
setRange(
"fit",rangeLo,rangeHi) ;
1032 projDeps.
add(*tmp) ;
1039 if (!rangeName || strchr(rangeName,
',')==0) {
1043 auto theNLL =
new RooNLLVar(baseName.c_str(),
"-log(likelihood)",
1044 *
this,data,projDeps,ext,rangeName,addCoefRangeName,numcpu,interl,
1045 verbose,splitr,cloneData,
false,
pc.getDouble(
"IntegrateBins"));
1046 theNLL->batchMode(
pc.getInt(
"BatchMode"));
1052 for (
const auto& token : tokens) {
1053 auto nllComp =
new RooNLLVar(
Form(
"%s_%s",baseName.c_str(),token.c_str()),
"-log(likelihood)",
1054 *
this,data,projDeps,ext,token.c_str(),addCoefRangeName,numcpu,interl,
1055 verbose,splitr,cloneData,
false,
pc.getDouble(
"IntegrateBins"));
1056 nllComp->batchMode(
pc.getInt(
"BatchMode"));
1057 nllList.
add(*nllComp) ;
1072 <<
" entries" << endl;
1073 allConstraints.
add(*constr);
1077 if (cPars && cPars->
getSize() > 0) {
1079 allConstraints.
add(*constraints);
1083 allConstraints.
add(*extCons);
1091 <<
" with " << allConstraints.
getSize() <<
" entries" << endl;
1099 if (allConstraints.
getSize()>0 && cPars) {
1101 coutI(
Minimization) <<
" Including the following constraint terms in minimization: " << allConstraints << endl ;
1103 coutI(
Minimization) <<
"The following global observables have been defined: " << *glObs << endl ;
1105 nllCons =
new RooConstraintSum(
Form(
"%s_constr",baseName.c_str()),
"nllCons",allConstraints,glObs ? *glObs : *cPars) ;
1118 if (doStripDisconnected) {
1291 RooLinkedList nllCmdList =
pc.filterCmdList(fitCmdList,
"ProjectedObservables,Extended,Range,"
1292 "RangeWithName,SumCoefRange,NumCPU,SplitRange,Constrained,Constrain,ExternalConstraints,"
1293 "CloneData,GlobalObservables,GlobalObservablesTag,OffsetLikelihood,BatchMode,IntegrateBins");
1295 pc.defineDouble(
"prefit",
"Prefit",0,0);
1296 pc.defineDouble(
"RecoverFromUndefinedRegions",
"RecoverFromUndefinedRegions",0,10.);
1297 pc.defineString(
"fitOpt",
"FitOptions",0,
"") ;
1298 pc.defineInt(
"optConst",
"Optimize",0,2) ;
1299 pc.defineInt(
"verbose",
"Verbose",0,0) ;
1300 pc.defineInt(
"doSave",
"Save",0,0) ;
1301 pc.defineInt(
"doTimer",
"Timer",0,0) ;
1302 pc.defineInt(
"plevel",
"PrintLevel",0,1) ;
1303 pc.defineInt(
"strat",
"Strategy",0,1) ;
1304 pc.defineInt(
"initHesse",
"InitialHesse",0,0) ;
1305 pc.defineInt(
"hesse",
"Hesse",0,1) ;
1306 pc.defineInt(
"minos",
"Minos",0,0) ;
1307 pc.defineInt(
"ext",
"Extended",0,2) ;
1308 pc.defineInt(
"numcpu",
"NumCPU",0,1) ;
1309 pc.defineInt(
"numee",
"PrintEvalErrors",0,10) ;
1310 pc.defineInt(
"doEEWall",
"EvalErrorWall",0,1) ;
1311 pc.defineInt(
"doWarn",
"Warnings",0,1) ;
1312 pc.defineInt(
"doSumW2",
"SumW2Error",0,-1) ;
1313 pc.defineInt(
"doAsymptoticError",
"AsymptoticError",0,-1) ;
1314 pc.defineInt(
"doOffset",
"OffsetLikelihood",0,0) ;
1315 pc.defineString(
"mintype",
"Minimizer",0,
"Minuit") ;
1316 pc.defineString(
"minalg",
"Minimizer",1,
"minuit") ;
1317 pc.defineObject(
"minosSet",
"Minos",0,0) ;
1318 pc.defineSet(
"cPars",
"Constrain",0,0) ;
1319 pc.defineSet(
"extCons",
"ExternalConstraints",0,0) ;
1320 pc.defineMutex(
"FitOptions",
"Verbose") ;
1321 pc.defineMutex(
"FitOptions",
"Save") ;
1322 pc.defineMutex(
"FitOptions",
"Timer") ;
1323 pc.defineMutex(
"FitOptions",
"Strategy") ;
1324 pc.defineMutex(
"FitOptions",
"InitialHesse") ;
1325 pc.defineMutex(
"FitOptions",
"Hesse") ;
1326 pc.defineMutex(
"FitOptions",
"Minos") ;
1327 pc.defineMutex(
"Range",
"RangeWithName") ;
1328 pc.defineMutex(
"InitialHesse",
"Minimizer") ;
1331 pc.process(fitCmdList) ;
1338 const double recoverFromNaN =
pc.getDouble(
"RecoverFromUndefinedRegions");
1339 const char* fitOpt =
pc.getString(
"fitOpt",0,
kTRUE) ;
1340 Int_t optConst =
pc.getInt(
"optConst") ;
1342 Int_t doSave =
pc.getInt(
"doSave") ;
1343 Int_t doTimer =
pc.getInt(
"doTimer") ;
1344 Int_t plevel =
pc.getInt(
"plevel") ;
1345 Int_t strat =
pc.getInt(
"strat") ;
1346 Int_t initHesse=
pc.getInt(
"initHesse") ;
1347 Int_t hesse =
pc.getInt(
"hesse") ;
1348 Int_t minos =
pc.getInt(
"minos") ;
1349 Int_t numee =
pc.getInt(
"numee") ;
1350 Int_t doEEWall =
pc.getInt(
"doEEWall") ;
1351 Int_t doWarn =
pc.getInt(
"doWarn") ;
1352 Int_t doSumW2 =
pc.getInt(
"doSumW2") ;
1353 Int_t doAsymptotic =
pc.getInt(
"doAsymptoticError");
1355 #ifdef __ROOFIT_NOROOMINIMIZER
1356 const char* minType =0 ;
1358 const char* minType =
pc.getString(
"mintype",
"Minuit") ;
1359 const char* minAlg =
pc.getString(
"minalg",
"minuit") ;
1367 conf.
defineInt(
"BatchMode",
"BatchMode",0,0);
1370 if (conf.
getInt(
"BatchMode") != 0) {
1380 if (weightedData && doSumW2==-1 && doAsymptotic==-1) {
1381 coutW(
InputArguments) <<
"RooAbsPdf::fitTo(" <<
GetName() <<
") WARNING: a likelihood fit is requested of what appears to be weighted data.\n"
1382 <<
" While the estimated values of the parameters will always be calculated taking the weights into account,\n"
1383 <<
" there are multiple ways to estimate the errors of the parameters. You are advised to make an \n"
1384 <<
" explicit choice for the error calculation:\n"
1385 <<
" - Either provide SumW2Error(true), to calculate a sum-of-weights-corrected HESSE error matrix\n"
1386 <<
" (error will be proportional to the number of events in MC).\n"
1387 <<
" - Or provide SumW2Error(false), to return errors from original HESSE error matrix\n"
1388 <<
" (which will be proportional to the sum of the weights, i.e., a dataset with <sum of weights> events).\n"
1389 <<
" - Or provide AsymptoticError(true), to use the asymptotically correct expression\n"
1390 <<
" (for details see https://arxiv.org/abs/1911.01303)."
1396 if (doSumW2==1 && minos) {
1397 coutW(
InputArguments) <<
"RooAbsPdf::fitTo(" <<
GetName() <<
") WARNING: sum-of-weights correction does not apply to MINOS errors" << endl ;
1399 if (doAsymptotic==1 && minos) {
1400 coutW(
InputArguments) <<
"RooAbsPdf::fitTo(" <<
GetName() <<
") WARNING: asymptotic correction does not apply to MINOS errors" << endl ;
1404 size_t nEvents =
static_cast<size_t>(prefit*data.
numEntries());
1405 if (prefit > 0.5 || nEvents < 100) {
1407 <<
"With the current PrefitDataFraction=" << prefit
1408 <<
", the number of events would be " << nEvents<<
" out of "
1409 << data.
numEntries() <<
". Skipping prefit..." << endl;
1427 pc.filterCmdList(tinyCmdList,
"Prefit,Hesse,Minos,Verbose,Save,Timer");
1431 tinyCmdList.
Add(&hesse_option);
1432 tinyCmdList.
Add(&print_option);
1434 fitTo(tiny,tinyCmdList);
1442 if (doSumW2==1 && doAsymptotic==1) {
1443 coutE(
InputArguments) <<
"RooAbsPdf::fitTo(" <<
GetName() <<
") ERROR: Cannot compute both asymptotically correct and SumW2 errors." << endl ;
1449 if (
string(minType)!=
"OldMinuit") {
1451 #ifndef __ROOFIT_NOROOMINIMIZER
1454 m.setMinimizerType(minType) ;
1456 m.setEvalErrorWall(doEEWall) ;
1457 m.setRecoverFromNaNStrength(recoverFromNaN);
1462 m.setPrintEvalErrors(numee) ;
1464 m.setPrintLevel(plevel) ;
1469 m.optimizeConst(optConst) ;
1475 ret =
m.fit(fitOpt) ;
1490 m.setStrategy(strat) ;
1499 m.minimize(minType,minAlg) ;
1507 if (doAsymptotic==1 &&
m.getNPar()>0) {
1509 std::unique_ptr<RooFitResult> rw(
m.save());
1512 coutI(
Fitting) <<
"RooAbsPdf::fitTo(" <<
GetName() <<
") Calculating covariance matrix according to the asymptotically correct approach. If you find this method useful please consider citing https://arxiv.org/abs/1911.01303." << endl;
1516 for (
int k=0; k<rw->floatParsFinal().getSize(); k++)
1517 for (
int l=0;
l<rw->floatParsFinal().getSize();
l++)
1521 std::vector<std::unique_ptr<RooDerivative> > derivatives;
1522 const RooArgList& floated = rw->floatParsFinal();
1523 std::unique_ptr<RooArgSet> floatingparams( (
RooArgSet*)
getParameters(data)->selectByAttrib(
"Constant",
false) );
1524 for (
const auto paramresult : floated) {
1525 auto paraminternal =
static_cast<RooRealVar*
>(floatingparams->find(*paramresult));
1527 std::unique_ptr<RooDerivative> deriv(
derivative(*paraminternal, *obs, 1) );
1528 derivatives.push_back(std::move(deriv));
1534 *obs = *data.
get(j);
1536 std::vector<Double_t> diffs(floated.getSize(), 0.0);
1537 for (
int k=0; k < floated.getSize(); k++) {
1538 const auto paramresult =
static_cast<RooRealVar*
>(floated.at(k));
1539 auto paraminternal =
static_cast<RooRealVar*
>(floatingparams->find(*paramresult));
1541 Double_t diff = derivatives.at(k)->getVal();
1543 *paraminternal = paramresult->getVal();
1548 for (
int k=0; k<floated.getSize(); k++) {
1549 for (
int l=0;
l<floated.getSize();
l++) {
1550 num(k,
l) += data.
weight()*data.
weight()*diffs.at(k)*diffs.at(
l)/(prob*prob);
1557 m.applyCovarianceMatrix(num);
1560 if (doSumW2==1 &&
m.getNPar()>0) {
1563 vector<RooNLLVar*> nllComponents;
1564 nllComponents.reserve(comps->
getSize());
1569 if (!nllComp)
continue;
1570 nllComponents.push_back(nllComp);
1577 for (vector<RooNLLVar*>::iterator it = nllComponents.begin(); nllComponents.end() != it; ++it) {
1578 (*it)->applyWeightSquared(
kTRUE);
1580 coutI(
Fitting) <<
"RooAbsPdf::fitTo(" <<
GetName() <<
") Calculating sum-of-weights-squared correction matrix for covariance matrix" << endl ;
1583 for (vector<RooNLLVar*>::iterator it = nllComponents.begin(); nllComponents.end() != it; ++it) {
1584 (*it)->applyWeightSquared(
kFALSE);
1591 CholeskyDecompGenDim<Double_t> decomp(matC.GetNrows(), matC);
1594 <<
") ERROR: Cannot apply sum-of-weights correction to covariance matrix: correction matrix calculated with weight-squared is singular" <<endl ;
1597 decomp.Invert(matC);
1600 for (
int i = 0; i < matC.GetNrows(); ++i)
1601 for (
int j = 0; j < i; ++j) matC(j, i) = matC(i, j);
1605 m.applyCovarianceMatrix(matC);
1615 m.minos(*minosSet) ;
1624 string title =
Form(
"Result of fit of p.d.f. %s to dataset %s",
GetName(),data.
GetName()) ;
1625 ret =
m.save(
name.c_str(),title.c_str()) ;
1630 m.optimizeConst(0) ;
1639 m.setEvalErrorWall(doEEWall) ;
1644 m.setPrintEvalErrors(numee) ;
1646 m.setPrintLevel(plevel) ;
1651 m.optimizeConst(optConst) ;
1657 ret =
m.fit(fitOpt) ;
1672 m.setStrategy(strat) ;
1689 if (doAsymptotic==1 &&
m.getNPar()>0) {
1691 std::unique_ptr<RooFitResult> rw(
m.save());
1694 coutI(
Fitting) <<
"RooAbsPdf::fitTo(" <<
GetName() <<
") Calculating covariance matrix according to the asymptotically correct approach. If you find this method useful please consider citing https://arxiv.org/abs/1911.01303." << endl;
1698 for (
int k=0; k<rw->floatParsFinal().getSize(); k++)
1699 for (
int l=0;
l<rw->floatParsFinal().getSize();
l++)
1703 std::vector<std::unique_ptr<RooDerivative> > derivatives;
1704 const RooArgList& floated = rw->floatParsFinal();
1705 std::unique_ptr<RooArgSet> floatingparams( (
RooArgSet*)
getParameters(data)->selectByAttrib(
"Constant",
false) );
1706 for (
int k=0; k<floated.
getSize(); k++) {
1709 std::unique_ptr<RooDerivative> deriv(
derivative(*paraminternal, *obs, 1) );
1710 derivatives.push_back(std::move(deriv));
1716 *obs = *data.
get(j);
1718 std::vector<Double_t> diffs(floated.
getSize(), 0.0);
1719 for (
int k=0; k<floated.
getSize(); k++) {
1723 Double_t diff = derivatives.at(k)->getVal();
1725 *paraminternal = paramresult->
getVal();
1730 for (
int k=0; k<floated.
getSize(); k++) {
1732 num(k,
l) += data.
weight()*data.
weight()*diffs.at(k)*diffs.at(
l)/(prob*prob);
1739 m.applyCovarianceMatrix(num);
1742 if (doSumW2==1 &&
m.getNPar()>0) {
1745 list<RooNLLVar*> nllComponents ;
1752 nllComponents.push_back(nllComp) ;
1760 for (list<RooNLLVar*>::iterator iter1=nllComponents.begin() ; iter1!=nllComponents.end() ; ++iter1) {
1761 (*iter1)->applyWeightSquared(
kTRUE) ;
1763 coutI(
Fitting) <<
"RooAbsPdf::fitTo(" <<
GetName() <<
") Calculating sum-of-weights-squared correction matrix for covariance matrix" << endl ;
1766 for (list<RooNLLVar*>::iterator iter2=nllComponents.begin() ; iter2!=nllComponents.end() ; ++iter2) {
1767 (*iter2)->applyWeightSquared(
kFALSE) ;
1774 CholeskyDecompGenDim<Double_t> decomp(matC.GetNrows(), matC);
1777 <<
") ERROR: Cannot apply sum-of-weights correction to covariance matrix: correction matrix calculated with weight-squared is singular" <<endl ;
1780 decomp.Invert(matC);
1783 for (
int i = 0; i < matC.GetNrows(); ++i)
1784 for (
int j = 0; j < i; ++j) matC(j, i) = matC(i, j);
1788 m.applyCovarianceMatrix(matC);
1798 m.minos(*minosSet) ;
1807 string title =
Form(
"Result of fit of p.d.f. %s to dataset %s",
GetName(),data.
GetName()) ;
1808 ret =
m.save(
name.c_str(),title.c_str()) ;
1814 m.optimizeConst(0) ;
1838 RooLinkedList chi2CmdList =
pc.filterCmdList(fitCmdList,
"Range,RangeWithName,NumCPU,Optimize,ProjectedObservables,AddCoefRange,SplitRange,DataError,Extended,IntegrateBins") ;
1887 pc.defineString(
"rangeName",
"RangeWithName",0,
"",
kTRUE) ;
1889 pc.process(cmdList) ;
1893 const char* rangeName =
pc.getString(
"rangeName",0,
kTRUE) ;
1903 if (!rangeName || strchr(rangeName,
',')==0) {
1906 chi2 =
new RooChi2Var(baseName.c_str(),baseName.c_str(),*
this,data,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) ;
1912 string rcmd =
"RangeWithName" ;
1913 if (arg1.
GetName()==rcmd) rarg = &arg1 ;
1914 if (arg2.
GetName()==rcmd) rarg = &arg2 ;
1915 if (arg3.
GetName()==rcmd) rarg = &arg3 ;
1916 if (arg4.
GetName()==rcmd) rarg = &arg4 ;
1917 if (arg5.
GetName()==rcmd) rarg = &arg5 ;
1918 if (arg6.
GetName()==rcmd) rarg = &arg6 ;
1919 if (arg7.
GetName()==rcmd) rarg = &arg7 ;
1920 if (arg8.
GetName()==rcmd) rarg = &arg8 ;
1928 &arg1==rarg?subRangeCmd:arg1,&arg2==rarg?subRangeCmd:arg2,
1929 &arg3==rarg?subRangeCmd:arg3,&arg4==rarg?subRangeCmd:arg4,
1930 &arg5==rarg?subRangeCmd:arg5,&arg6==rarg?subRangeCmd:arg6,
1931 &arg7==rarg?subRangeCmd:arg7,&arg8==rarg?subRangeCmd:arg8) ;
1932 chi2List.
add(*chi2Comp) ;
1953 pc.defineInt(
"integrate",
"Integrate",0,0) ;
1954 pc.defineObject(
"yvar",
"YVar",0,0) ;
1957 pc.process(cmdList) ;
1963 Bool_t integrate =
pc.getInt(
"integrate") ;
2000 os <<
indent <<
"--- RooAbsPdf ---" << endl;
2003 os <<
indent <<
" Normalization integral: " << endl ;
2036 if (prototype || (auxProto && auxProto->
getSize()>0)) {
2112 pc.defineObject(
"proto",
"PrototypeData",0,0) ;
2113 pc.defineString(
"dsetName",
"Name",0,
"") ;
2114 pc.defineInt(
"randProto",
"PrototypeData",0,0) ;
2115 pc.defineInt(
"resampleProto",
"PrototypeData",1,0) ;
2116 pc.defineInt(
"verbose",
"Verbose",0,0) ;
2117 pc.defineInt(
"extended",
"Extended",0,0) ;
2118 pc.defineInt(
"nEvents",
"NumEvents",0,0) ;
2119 pc.defineInt(
"autoBinned",
"AutoBinned",0,1) ;
2120 pc.defineInt(
"expectedData",
"ExpectedData",0,0) ;
2121 pc.defineDouble(
"nEventsD",
"NumEventsD",0,-1.) ;
2122 pc.defineString(
"binnedTag",
"GenBinned",0,
"") ;
2123 pc.defineMutex(
"GenBinned",
"ProtoData") ;
2124 pc.defineMutex(
"Extended",
"NumEvents");
2127 pc.process(arg1,arg2,arg3,arg4,arg5,arg6) ;
2134 const char* dsetName =
pc.getString(
"dsetName") ;
2136 Bool_t randProto =
pc.getInt(
"randProto") ;
2137 Bool_t resampleProto =
pc.getInt(
"resampleProto") ;
2138 Bool_t extended =
pc.getInt(
"extended") ;
2139 Bool_t autoBinned =
pc.getInt(
"autoBinned") ;
2140 const char* binnedTag =
pc.getString(
"binnedTag") ;
2141 Int_t nEventsI =
pc.getInt(
"nEvents") ;
2144 Bool_t expectedData =
pc.getInt(
"expectedData") ;
2155 }
else if (nEvents==0) {
2156 cxcoutI(
Generation) <<
"No number of events specified , number of events generated is "
2160 if (extended && protoData && !randProto) {
2161 cxcoutI(
Generation) <<
"WARNING Using generator option Extended() (Poisson distribution of #events) together "
2162 <<
"with a prototype dataset implies incomplete sampling or oversampling of proto data. "
2163 <<
"Set randomize flag in ProtoData() option to randomize prototype dataset order and thus "
2164 <<
"to randomize the set of over/undersampled prototype events for each generation cycle." << endl ;
2173 data =
generate(whatVars,nEvents,
verbose,autoBinned,binnedTag,expectedData, extended) ;
2177 if (dsetName && strlen(dsetName)>0) {
2204 pc.defineObject(
"proto",
"PrototypeData",0,0) ;
2205 pc.defineString(
"dsetName",
"Name",0,
"") ;
2206 pc.defineInt(
"randProto",
"PrototypeData",0,0) ;
2207 pc.defineInt(
"resampleProto",
"PrototypeData",1,0) ;
2208 pc.defineInt(
"verbose",
"Verbose",0,0) ;
2209 pc.defineInt(
"extended",
"Extended",0,0) ;
2210 pc.defineInt(
"nEvents",
"NumEvents",0,0) ;
2211 pc.defineInt(
"autoBinned",
"AutoBinned",0,1) ;
2212 pc.defineString(
"binnedTag",
"GenBinned",0,
"") ;
2213 pc.defineMutex(
"GenBinned",
"ProtoData") ;
2217 pc.process(arg1,arg2,arg3,arg4,arg5,arg6) ;
2224 const char* dsetName =
pc.getString(
"dsetName") ;
2225 Int_t nEvents =
pc.getInt(
"nEvents") ;
2227 Bool_t randProto =
pc.getInt(
"randProto") ;
2228 Bool_t resampleProto =
pc.getInt(
"resampleProto") ;
2229 Bool_t extended =
pc.getInt(
"extended") ;
2230 Bool_t autoBinned =
pc.getInt(
"autoBinned") ;
2231 const char* binnedTag =
pc.getString(
"binnedTag") ;
2235 return new GenSpec(cx,whatVars,protoData,nEvents,extended,randProto,resampleProto,dsetName) ;
2285 return new RooDataSet(
"emptyData",
"emptyData",whatVars) ;
2295 if(0 != context && context->
isValid()) {
2301 if(0 != context)
delete context;
2315 if (nEvents==0 && (prototype==0 || prototype->
numEntries()==0)) {
2316 return new RooDataSet(
"emptyData",
"emptyData",whatVars) ;
2322 if (resampleProto) {
2323 randProtoOrder=
kTRUE ;
2326 if (randProtoOrder && prototype && prototype->
numEntries()!=nEvents) {
2327 coutI(
Generation) <<
"RooAbsPdf::generate (Re)randomizing event order in prototype dataset (Nevt=" << nEvents <<
")" << endl ;
2334 generated= context.
generate(nEvents,skipInit,extended);
2337 coutE(
Generation) <<
"RooAbsPdf::generate(" <<
GetName() <<
") do not have a valid generator context" << endl;
2376 coutE(
Generation) <<
"RooAbsPdf::generate(" <<
GetName() <<
") ERROR creating generator context" << endl ;
2393 for (i=0 ; i<nProto ; i++) {
2401 if (!resampleProto) {
2403 for (i=0 ; i<nProto ; i++) {
2412 for (i=0 ; i<nProto ; i++) {
2474 if(server == &arg)
continue;
2475 if(server->dependsOn(arg)) {
2515 pc.defineString(
"dsetName",
"Name",0,
"") ;
2516 pc.defineInt(
"verbose",
"Verbose",0,0) ;
2517 pc.defineInt(
"extended",
"Extended",0,0) ;
2518 pc.defineInt(
"nEvents",
"NumEvents",0,0) ;
2519 pc.defineDouble(
"nEventsD",
"NumEventsD",0,-1.) ;
2520 pc.defineInt(
"expectedData",
"ExpectedData",0,0) ;
2523 pc.process(arg1,arg2,arg3,arg4,arg5,arg6) ;
2529 Double_t nEvents =
pc.getDouble(
"nEventsD") ;
2531 nEvents =
pc.getInt(
"nEvents") ;
2534 Bool_t extended =
pc.getInt(
"extended") ;
2535 Bool_t expectedData =
pc.getInt(
"expectedData") ;
2536 const char* dsetName =
pc.getString(
"dsetName") ;
2541 cxcoutI(
Generation) <<
" Extended mode active, number of events generated (" << nEvents <<
") is Poisson fluctuation on "
2542 <<
GetName() <<
"::expectedEvents() = " << nEvents << endl ;
2547 }
else if (nEvents==0) {
2548 cxcoutI(
Generation) <<
"No number of events specified , number of events generated is "
2556 if (dsetName && strlen(dsetName)>0) {
2599 coutE(
InputArguments) <<
"RooAbsPdf::generateBinned(" <<
GetName() <<
") ERROR: No event count provided and p.d.f does not provide expected number of events" << endl ;
2605 if (expectedData || extended) {
2618 Int_t histOutSum(0) ;
2627 }
else if (extended) {
2637 if (hist->
weight()>histMax) {
2638 histMax = hist->
weight() ;
2641 histOutSum += histOut[i] ;
2646 if (!expectedData && !extended) {
2651 Int_t nEvtExtra = abs(
Int_t(nEvents)-histOutSum) ;
2652 Int_t wgt = (histOutSum>nEvents) ? -1 : 1 ;
2655 std::size_t counter = 0;
2656 bool havePrintedInfo =
false;
2657 while(nEvtExtra>0) {
2660 hist->
get(ibinRand) ;
2663 if (ranY<hist->weight()) {
2665 histOut[ibinRand]++ ;
2668 if (histOut[ibinRand]>0) {
2669 histOut[ibinRand]-- ;
2677 if ((counter++ > 10*nEvents || nEvents > 1.E7) && !havePrintedInfo) {
2678 havePrintedInfo =
true;
2679 coutP(
Generation) <<
"RooAbsPdf::generateBinned(" <<
GetName() <<
") Performing costly accept/reject sampling. If this takes too long, use "
2680 <<
"extended mode to speed up the process." << std::endl;
2687 hist->
set(histOut[i],
sqrt(1.0*histOut[i])) ;
2690 }
else if (expectedData) {
2713 return generate(whatVars,nEvents) ;
2717 void removeRangeOverlap(std::vector<std::pair<double, double>>& ranges) {
2719 std::sort(ranges.begin(), ranges.end());
2721 for (
auto it = ranges.begin(); it != ranges.end(); ++it) {
2722 double& startL = it->first;
2723 double& endL = it->second;
2725 for (
auto innerIt = it+1; innerIt != ranges.end(); ++innerIt) {
2726 const double startR = innerIt->first;
2727 const double endR = innerIt->second;
2729 if (startL <= startR && startR <= endL) {
2731 endL = std::max(endL, endR);
2732 *innerIt = make_pair(0., 0.);
2737 auto newEnd = std::remove_if(ranges.begin(), ranges.end(),
2738 [](
const std::pair<double,double>& input){
2739 return input.first == input.second;
2741 ranges.erase(newEnd, ranges.end());
2852 cmdList.
Add(plotRange) ;
2857 cmdList.
Add(normRange2) ;
2860 if (plotRange || normRange2) {
2861 coutI(
Plotting) <<
"RooAbsPdf::plotOn(" <<
GetName() <<
") p.d.f was fitted in a subrange and no explicit "
2862 << (plotRange?
"Range()":
"") << ((plotRange&&normRange2)?
" and ":
"")
2863 << (normRange2?
"NormRange()":
"") <<
" was specified. Plotting / normalising in fit range. To override, do one of the following"
2864 <<
"\n\t- Clear the automatic fit range attribute: <pdf>.setStringAttribute(\"fitrange\", nullptr);"
2865 <<
"\n\t- Explicitly specify the plotting range: Range(\"<rangeName>\")."
2866 <<
"\n\t- Explicitly specify where to compute the normalisation: NormRange(\"<rangeName>\")."
2867 <<
"\n\tThe default (full) range can be denoted with Range(\"\") / NormRange(\"\")."<< endl ;
2875 pc.defineDouble(
"scaleFactor",
"Normalization",0,1.0) ;
2876 pc.defineInt(
"scaleType",
"Normalization",0,
Relative) ;
2877 pc.defineObject(
"compSet",
"SelectCompSet",0) ;
2878 pc.defineString(
"compSpec",
"SelectCompSpec",0) ;
2879 pc.defineObject(
"asymCat",
"Asymmetry",0) ;
2880 pc.defineDouble(
"rangeLo",
"Range",0,-999.) ;
2881 pc.defineDouble(
"rangeHi",
"Range",1,-999.) ;
2882 pc.defineString(
"rangeName",
"RangeWithName",0,
"") ;
2883 pc.defineString(
"normRangeName",
"NormRange",0,
"") ;
2884 pc.defineInt(
"rangeAdjustNorm",
"Range",0,0) ;
2885 pc.defineInt(
"rangeWNAdjustNorm",
"RangeWithName",0,0) ;
2886 pc.defineMutex(
"SelectCompSet",
"SelectCompSpec") ;
2887 pc.defineMutex(
"Range",
"RangeWithName") ;
2888 pc.allowUndefined() ;
2891 pc.process(cmdList) ;
2898 Double_t scaleFactor =
pc.getDouble(
"scaleFactor") ;
2900 const char* compSpec =
pc.getString(
"compSpec") ;
2902 Bool_t haveCompSel = ( (compSpec && strlen(compSpec)>0) || compSet) ;
2906 if (compSpec && strlen(compSpec)>0) {
2907 nameSuffix.
Append(
"_Comp[") ;
2908 nameSuffix.
Append(compSpec) ;
2910 }
else if (compSet) {
2911 nameSuffix.
Append(
"_Comp[") ;
2917 pc.stripCmdList(cmdList,
"SelectCompSet,SelectCompSpec") ;
2921 RooCmdArg cnsuffix(
"CurveNameSuffix",0,0,0,0,nameSuffix.
Data(),0,0,0) ;
2922 cmdList.
Add(&cnsuffix);
2931 <<
"): ERROR the 'Expected' scale option can only be used on extendable PDFs" << endl ;
2943 std::vector<pair<Double_t,Double_t> > rangeLim;
2946 if (
pc.hasProcessed(
"Range")) {
2950 rangeLim.push_back(make_pair(rangeLo,rangeHi)) ;
2951 adjustNorm =
pc.getInt(
"rangeAdjustNorm") ;
2952 hasCustomRange =
kTRUE ;
2955 << rangeLo <<
"," << rangeHi <<
"]" ;
2956 if (!
pc.hasProcessed(
"NormRange")) {
2957 ccoutI(
Plotting) <<
", curve is normalized to data in " << (adjustNorm?
"given":
"full") <<
" range" << endl ;
2962 nameSuffix.
Append(
Form(
"_Range[%f_%f]",rangeLo,rangeHi)) ;
2964 }
else if (
pc.hasProcessed(
"RangeWithName")) {
2966 for (
const std::string& rangeNameToken :
RooHelpers::tokenise(
pc.getString(
"rangeName",
"",
false),
",",
true)) {
2967 const char* thisRangeName = rangeNameToken.empty() ? nullptr : rangeNameToken.c_str();
2969 coutE(
Plotting) <<
"Range '" << rangeNameToken <<
"' not defined for variable '"
2975 adjustNorm =
pc.getInt(
"rangeWNAdjustNorm") ;
2976 hasCustomRange =
kTRUE ;
2978 coutI(
Plotting) <<
"RooAbsPdf::plotOn(" <<
GetName() <<
") only plotting range '" <<
pc.getString(
"rangeName",
"",
false) <<
"'" ;
2979 if (!
pc.hasProcessed(
"NormRange")) {
2980 ccoutI(
Plotting) <<
", curve is normalized to data in " << (adjustNorm?
"given":
"full") <<
" range" << endl ;
2985 nameSuffix.
Append(
Form(
"_Range[%s]",
pc.getString(
"rangeName"))) ;
2988 if (
pc.hasProcessed(
"NormRange")) {
2990 for (
const auto& rangeNameToken :
RooHelpers::tokenise(
pc.getString(
"normRangeName",
"",
false),
",",
true)) {
2991 const char* thisRangeName = rangeNameToken.empty() ? nullptr : rangeNameToken.c_str();
2993 coutE(
Plotting) <<
"Range '" << rangeNameToken <<
"' not defined for variable '"
2999 adjustNorm =
kTRUE ;
3000 hasCustomRange =
kTRUE ;
3001 coutI(
Plotting) <<
"RooAbsPdf::plotOn(" <<
GetName() <<
") p.d.f. curve is normalized using explicit choice of ranges '" <<
pc.getString(
"normRangeName",
"",
false) <<
"'" << endl ;
3003 nameSuffix.
Append(
Form(
"_NormRange[%s]",
pc.getString(
"rangeName"))) ;
3007 if (hasCustomRange && adjustNorm) {
3009 const std::size_t oldSize = rangeLim.size();
3010 removeRangeOverlap(rangeLim);
3012 if (oldSize != rangeLim.size() && !
pc.hasProcessed(
"NormRange")) {
3016 coutE(
Plotting) <<
"Requested plot/integration ranges overlap. For correct plotting, new ranges "
3017 "will be defined." << std::endl;
3020 std::string rangesNoOverlap;
3021 for (
auto it = rangeLim.begin(); it != rangeLim.end(); ++it) {
3022 std::stringstream rangeName;
3023 rangeName <<
"Remove_overlap_range_" << it - rangeLim.begin();
3024 plotVar->setRange(rangeName.str().c_str(), it->first, it->second);
3025 if (!rangesNoOverlap.empty())
3026 rangesNoOverlap +=
",";
3027 rangesNoOverlap += rangeName.str();
3032 rangeArg->
setString(0, rangesNoOverlap.c_str());
3035 cmdList.
Add(plotRange);
3040 for (
const auto& riter : rangeLim) {
3045 scaleFactor *= rangeNevt/nExpected ;
3051 scaleFactor *= nExpected ;
3053 scaleFactor /= nExpected ;
3072 for (
const auto arg : branchNodeSet) {
3074 branchNodeSet.remove(*arg) ;
3085 if (dirSelNodes->
getSize()>0) {
3086 coutI(
Plotting) <<
"RooAbsPdf::plotOn(" <<
GetName() <<
") directly selected PDF components: " << *dirSelNodes << endl ;
3092 coutE(
Plotting) <<
"RooAbsPdf::plotOn(" <<
GetName() <<
") ERROR: component selection set " << *compSet <<
" does not match any components of p.d.f." << endl ;
3094 coutE(
Plotting) <<
"RooAbsPdf::plotOn(" <<
GetName() <<
") ERROR: component selection expression '" << compSpec <<
"' does not select any components of p.d.f." << endl ;
3099 delete dirSelNodes ;
3103 RooCmdArg cnsuffix(
"CurveNameSuffix",0,0,0,0,nameSuffix.
Data(),0,0,0) ;
3104 cmdList.
Add(&cnsuffix);
3146 <<
"): ERROR the 'Expected' scale option can only be used on extendable PDFs" << endl ;
3213 pc.defineString(
"label",
"Label",0,
"") ;
3214 pc.defineDouble(
"xmin",
"Layout",0,0.50) ;
3215 pc.defineDouble(
"xmax",
"Layout",1,0.99) ;
3216 pc.defineInt(
"ymaxi",
"Layout",0,
Int_t(0.95*10000)) ;
3217 pc.defineInt(
"showc",
"ShowConstants",0,0) ;
3218 pc.defineObject(
"params",
"Parameters",0,0) ;
3219 pc.defineString(
"formatStr",
"Format",0,
"NELU") ;
3220 pc.defineInt(
"sigDigit",
"Format",0,2) ;
3221 pc.defineInt(
"dummy",
"FormatArgs",0,0) ;
3222 pc.defineMutex(
"Format",
"FormatArgs") ;
3225 pc.process(cmdList) ;
3230 const char* label =
pc.getString(
"label") ;
3234 Int_t showc =
pc.getInt(
"showc") ;
3237 const char* formatStr =
pc.getString(
"formatStr") ;
3238 Int_t sigDigit =
pc.getInt(
"sigDigit") ;
3244 if (
pc.hasProcessed(
"FormatArgs")) {
3254 if (
pc.hasProcessed(
"FormatArgs")) {
3303 Bool_t showLabel= (label != 0 && strlen(label) > 0);
3308 for (
const auto param : params) {
3310 if(showConstants || !var->isConstant())
ymin-= dy;
3313 std::string labelString = label;
3314 unsigned int numLines = std::count(labelString.begin(), labelString.end(),
'\n') + 1;
3315 if (showLabel)
ymin -= numLines * dy;
3321 box->SetFillColor(0);
3322 box->SetBorderSize(1);
3323 box->SetTextAlign(12);
3324 box->SetTextSize(0.04F);
3325 box->SetFillStyle(1001);
3326 box->SetFillColor(0);
3328 for (
const auto param : params) {
3329 auto var =
static_cast<const RooRealVar*
>(param);
3330 if(var->isConstant() && !showConstants)
continue;
3332 TString *formatted= options ? var->format(sigDigits, options) : var->format(*formatCmd) ;
3333 box->AddText(formatted->
Data());
3404 pdfOwner->
_norm = 0 ;
3420 name.Append(
"_Proj[") ;
3482 pc.defineObject(
"supNormSet",
"SupNormSet",0,0) ;
3483 pc.defineInt(
"numScanBins",
"ScanParameters",0,1000) ;
3484 pc.defineInt(
"intOrder",
"ScanParameters",1,2) ;
3485 pc.defineInt(
"doScanNum",
"ScanNumCdf",0,1) ;
3486 pc.defineInt(
"doScanAll",
"ScanAllCdf",0,0) ;
3487 pc.defineInt(
"doScanNon",
"ScanNoCdf",0,0) ;
3488 pc.defineMutex(
"ScanNumCdf",
"ScanAllCdf",
"ScanNoCdf") ;
3491 pc.process(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) ;
3502 Int_t numScanBins =
pc.getInt(
"numScanBins") ;
3503 Int_t intOrder =
pc.getInt(
"intOrder") ;
3504 Int_t doScanNum =
pc.getInt(
"doScanNum") ;
3505 Int_t doScanAll =
pc.getInt(
"doScanAll") ;
3506 Int_t doScanNon =
pc.getInt(
"doScanNon") ;
3521 coutI(
NumIntegration) <<
"RooAbsPdf::createCdf(" <<
GetName() <<
") integration over observable(s) " << iset <<
" involves numeric integration," << endl
3522 <<
" constructing cdf though numeric integration of sampled pdf in " << numScanBins <<
" bins and applying order "
3523 << intOrder <<
" interpolation on integrated histogram." << endl
3524 <<
" To override this choice of technique use argument ScanNone(), to change scan parameters use ScanParameters(nbins,order) argument" << endl ;
3536 ivar->
setBins(numScanBins,
"numcdf") ;
3554 for (
const auto arg : *comps) {
3555 auto pdf =
dynamic_cast<const RooAbsPdf*
>(arg) ;
3556 if (pdf && !ret->
find(pdf->GetName())) {
3557 std::unique_ptr<RooArgSet> compRet(pdf->getConstraints(observables,constrainedParams,stripDisconnected));
3612 if (config)
return config ;
3650 delete _genContext ;
3658 _genContext(context), _whatVars(whatVars), _protoData(protoData), _nGen(nGen), _extended(extended),
3659 _randProto(randProto), _resampleProto(resampleProto), _dsetName(dsetName), _init(init)
virtual TObject * Clone(const char *newname=0) const
Make a clone of an object using the Streamer facility.
virtual Double_t analyticalIntegral(Int_t code, const char *rangeName=0) const
Implements the actual analytical integral(s) advertised by getAnalyticalIntegral.
std::pair< double, double > getRange(const char *name=0) const
Get low and high bound of the variable.
RooAbsReal * createScanCdf(const RooArgSet &iset, const RooArgSet &nset, Int_t numScanBins, Int_t intOrder)
RooArgSet * _normSet
Normalization integral (owned by _normMgr)
Int_t setObj(const RooArgSet *nset, T *obj, const TNamed *isetRangeName=0)
virtual RooFitResult * chi2FitTo(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())
Perform a fit to given histogram.
virtual RooSpan< double > evaluateSpan(RooBatchCompute::RunContext &evalData, const RooArgSet *normSet) const
Evaluate this object for a batch/span of data points.
TString _normRange
MC generator configuration specific for this object.
RooCmdArg is a named container for two doubles, two integers two object points and three string point...
virtual RooAbsGenContext * genContext(const RooArgSet &vars, const RooDataSet *prototype=0, const RooArgSet *auxProto=0, Bool_t verbose=kFALSE) const
Interface function to create a generator context from a p.d.f.
OperMode operMode() const
Query the operation mode of this node.
virtual RooDataSet * generateSimGlobal(const RooArgSet &whatVars, Int_t nEvents)
Special generator interface for generation of 'global observables' – for RooStats tools.
static void setEvalErrorLoggingMode(ErrorLoggingMode m)
Set evaluation error logging mode.
Bool_t traceEvalPdf(Double_t value) const
Check that passed value is positive and not 'not-a-number'.
void allowUndefined(Bool_t flag=kTRUE)
RooAbsArg * first() const
void updateNormVars(const RooArgSet &vars)
Install the given set of observables are reference normalization variables for this frame.
virtual RooAbsGenContext * autoGenContext(const RooArgSet &vars, const RooDataSet *prototype=0, const RooArgSet *auxProto=0, Bool_t verbose=kFALSE, Bool_t autoBinned=kTRUE, const char *binnedTag="") const
void logEvalError(const char *message, const char *serverValueString=0) const
Log evaluation error message.
virtual Bool_t isNonPoissonWeighted() const
RooAbsData is the common abstract base class for binned and unbinned datasets.
void setNormRangeOverride(const char *rangeName)
virtual void generateEvent(Int_t code)
Interface for generation of an event using the algorithm corresponding to the specified code.
void set(Double_t weight, Double_t wgtErr=-1)
Set the weight and weight error of the bin enclosing the current (i.e.
RooArgSet * getComponents() const
Create a RooArgSet with all components (branch nodes) of the expression tree headed by this object.
T * getObj(const RooArgSet *nset, Int_t *sterileIndex=0, const TNamed *isetRangeName=0)
static double packFloatIntoNaN(float payload)
Pack float into mantissa of a NaN.
virtual ExtendMode extendMode() const
Returns ability of PDF to provide extended likelihood terms.
RooCmdArg PrintLevel(Int_t code)
virtual Bool_t isBinnedDistribution(const RooArgSet &) const
Tests if the distribution is binned. Unless overridden by derived classes, this always returns false.
const char * Data() const
virtual Bool_t isWeighted() const
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 ...
std::vector< double > logProbabilities
If evaluation should only occur in a range, the range name can be passed here.
char * Form(const char *fmt,...)
virtual const char * GetTitle() const
Returns title of object.
const RooArgSet & numIntRealVars() const
Bool_t process(const RooCmdArg &arg)
Process given RooCmdArg.
virtual void Print(Option_t *options=0) const
Print the object to the defaultPrintStream().
static UInt_t integer(UInt_t max, TRandom *generator=randomGenerator())
Return an integer uniformly distributed from [0,n-1].
RefCountList_t _serverList
Class RooNumCdf is an implementation of RooNumRunningInt specialized to calculate cumulative distribu...
Double_t getFitRangeNEvt() const
Return the number of events in the fit range.
virtual RooAbsGenContext * binnedGenContext(const RooArgSet &vars, Bool_t verbose=kFALSE) const
Return a binned generator context.
void setCacheSource(Bool_t flag)
RooSpan< const double > getLogProbabilities(RooBatchCompute::RunContext &evalData, const RooArgSet *normSet=nullptr) const
Compute the log-likelihoods for all events in the requested batch.
static void output(int code)
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.
RooArgList is a container object that can hold multiple RooAbsArg objects.
Class RooGenContext implement a universal generator context for all RooAbsPdf classes that do not hav...
RooCmdArg WeightVar(const char *name, Bool_t reinterpretAsWeight=kFALSE)
virtual Double_t weight() const =0
RooCmdArg Hesse(Bool_t flag=kTRUE)
Bool_t plotSanityChecks(RooPlot *frame) const
Utility function for plotOn(), perform general sanity check on frame to ensure safe plotting operatio...
Double_t getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
virtual const RooArgSet * get() const
virtual RooDataSet * generate(Double_t nEvents=0, Bool_t skipInit=kFALSE, Bool_t extendedMode=kFALSE)
Generate the specified number of events with nEvents>0 and and return a dataset containing the genera...
virtual Double_t getValV(const RooArgSet *set=0) const
Return current value, normalized by integrating over the observables in nset.
virtual void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Print multi line detailed information of this RooAbsPdf.
RooChi2Var implements a simple calculation from a binned dataset and a PDF.
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
RooAbsPdf()
Default constructor.
virtual Double_t Uniform(Double_t x1=1)
Returns a uniform deviate on the interval (0, x1).
RooCmdArg Normalization(Double_t scaleFactor)
void setInt(Int_t idx, Int_t value)
RooAbsArg * find(const char *name) const
Find object with given name in list.
RooNumGenConfig * specialGeneratorConfig() const
Returns the specialized integrator configuration for this RooAbsReal.
static constexpr double pc
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
virtual Double_t weight() const
void setOperMode(OperMode mode, Bool_t recurseADirty=kTRUE)
Set the operation mode of this node.
virtual Int_t getGenerator(const RooArgSet &directVars, RooArgSet &generateVars, Bool_t staticInitOK=kTRUE) const
Load generatedVars with the subset of directVars that we can generate events for, and return a code t...
Normalization set with for above integral.
static void indent(ostringstream &buf, int indent_level)
void sterilize()
Clear the cache payload but retain slot mapping w.r.t to normalization and integration sets.
static RooNumGenConfig * defaultGeneratorConfig()
Returns the default numeric MC generator configuration for all RooAbsReals.
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
const RooNumIntConfig * getIntegratorConfig() const
Return the numeric integration configuration used for this object.
void SetName(const char *name) override
Change the name of this dataset into the given name.
RooAbsArg * at(Int_t idx) const
Return object at given index, or nullptr if index is out of range.
virtual void initGenerator(Int_t code)
Interface for one-time initialization to setup the generator for the specified code.
RooObjCacheManager _normMgr
RooArgSet * select(const RooArgSet &list) const
Construct a RooArgSet of objects in input 'list' whose names match to those in the internal name list...
TObject * FindObject(const char *name) const
Return pointer to obejct with given name.
void setRange(const char *name, Double_t min, Double_t max)
Set a fit or plotting range.
const RooArgSet * set(const char *name)
Return pointer to previously defined named set with given nmame If no such set is found a null pointe...
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
void Clear()
Clear string without changing its capacity.
virtual Bool_t isDirectGenSafe(const RooAbsArg &arg) const
Check if given observable can be safely generated using the pdfs internal generator mechanism (if tha...
void branchNodeServerList(RooAbsCollection *list, const RooAbsArg *arg=0, Bool_t recurseNonDerived=kFALSE) const
Fill supplied list with all branch nodes of the arg tree starting with ourself as top node.
virtual 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
Helper calling plotOn(RooPlot*, RooLinkedList&) const.
header file containing the templated implementation of matrix inversion routines for use with ROOT's ...
Iterator abstract base class.
RooFitResult is a container class to hold the input and output of a PDF fit to a dataset.
RooInt is a minimal implementation of a TObject holding a Int_t value.
Int_t getInt(const char *name, Int_t defaultValue=0)
Return integer property registered with name 'name'.
static int verboseEval()
Return global level of verbosity for p.d.f. evaluations.
virtual void setProtoDataOrder(Int_t *lut)
Set the traversal order of prototype data to that in the lookup tables passed as argument.
constexpr std::span< T >::index_type size() const noexcept
void setTraceCounter(Int_t value, Bool_t allNodes=kFALSE)
Reset trace counter to given value, limiting the number of future trace messages for this pdf to 'val...
RooRealIntegral performs hybrid numerical/analytical integrals of RooAbsReal objects.
void setString(Int_t idx, const char *value)
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 ...
void setGeneratorConfig()
Remove the specialized numeric MC generator configuration associated with this object.
Class RooCmdConfig is a configurable parser for RooCmdArg named arguments.
virtual Double_t extendedTerm(Double_t observedEvents, const RooArgSet *nset=0) const
Return the extended likelihood term ( ) of this PDF for the given number of observed events.
RooArgSet * getParameters(const RooAbsData *data, Bool_t stripDisconnected=kTRUE) const
Create a list of leaf nodes in the arg tree starting with ourself as top node that don't match any of...
void addObject(TObject *obj, Option_t *drawOptions="", Bool_t invisible=kFALSE)
Add a generic object to this plot.
virtual const char * GetName() const
Returns name of object.
Double_t getFitRangeBinW() const
Return the bin width that is being used to normalise the PDF.
RooAbsCollection * selectByName(const char *nameList, Bool_t verbose=kFALSE) const
Create a subset of the current collection, consisting only of those elements with names matching the ...
virtual void add(const RooArgSet &row, Double_t weight=1.0, Double_t weightError=0) override
Add a data point, with its coordinates specified in the 'data' argset, to the data set.
void setStringAttribute(const Text_t *key, const Text_t *value)
Associate string 'value' to this object under key 'key'.
virtual ~RooAbsPdf()
Destructor.
void setNormRange(const char *rangeName)
VecExpr< UnaryOp< Fabs< T >, VecExpr< A, T, D >, T >, T, D > fabs(const VecExpr< A, T, D > &rhs)
The RooDataHist is a container class to hold N-dimensional binned data.
Double_t getNorm(const RooArgSet &nset) const
Get normalisation term needed to normalise the raw values returned by getVal().
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.
RooCachedReal is an implementation of RooAbsCachedReal that can cache any external RooAbsReal input f...
TString integralNameSuffix(const RooArgSet &iset, const RooArgSet *nset=0, const char *rangeName=0, Bool_t omitEmpty=kFALSE) const
Construct string with unique suffix name to give to integral object that encodes integrated observabl...
Bool_t isValueDirty() const
virtual Double_t sumEntries() const
Return effective number of entries in dataset, i.e., sum all weights.
The TNamed class is the base class for all named ROOT classes.
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...
TString & Append(const char *cs)
RooBinnedGenContext is an efficient implementation of the generator context specific for binned pdfs.
Double_t analyticalIntegralWN(Int_t code, const RooArgSet *normSet, const char *rangeName=0) const
Analytical integral with normalization (see RooAbsReal::analyticalIntegralWN() for further informatio...
void clearValueAndShapeDirty() const
virtual RooAbsReal * createNLL(RooAbsData &data, const RooLinkedList &cmdList)
Construct representation of -log(L) of PDFwith given dataset.
RooDerivative * derivative(RooRealVar &obs, Int_t order=1, Double_t eps=0.001)
Return function representing first, second or third order derivative of this function.
virtual const RooArgSet * get() const
TString getTitle(Bool_t appendUnit=kFALSE) const
Return this variable's title string.
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...
Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE) override
Add element to non-owning set.
const RooNumGenConfig * getGeneratorConfig() const
Return the numeric MC generator configuration used for this object.
RooAbsCollection * selectCommon(const RooAbsCollection &refColl) const
Create a subset of the current collection, consisting only of those elements that are contained as we...
Class RooNLLVar implements a -log(likelihood) calculation from a dataset and a PDF.
RooLinkedList is an collection class for internal use, storing a collection of RooAbsArg pointers in ...
TIterator * createIterator(Bool_t dir=kIterForward) const
TIterator-style iteration over contained elements.
virtual Double_t evaluate() const =0
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
static TString _normRangeOverride
RooDataHist * fillDataHist(RooDataHist *hist, const RooArgSet *nset, Double_t scaleFactor, Bool_t correctForBinVolume=kFALSE, Bool_t showProgress=kFALSE) const
Fill a RooDataHist with values sampled from this function at the bin centers.
RooFitResult * chi2FitDriver(RooAbsReal &fcn, RooLinkedList &cmdList)
Internal driver function for chi2 fits.
Bool_t defineSetInternal(const char *name, const RooArgSet &aset)
RooAbsReal * createIntRI(const RooArgSet &iset, const RooArgSet &nset=RooArgSet())
Utility function for createRunningIntegral.
virtual ~CacheElem()
Destructor of normalization cache element.
friend class RooProjectedPdf
RooAddition calculates the sum of a set of RooAbsReal terms, or when constructed with two sets,...
A RooPlot is a plot frame and a container for graphics objects within that frame.
RooAbsGenContext is the abstract base class for generator contexts of RooAbsPdf objects.
void setProxyNormSet(const RooArgSet *nset)
Forward a change in the cached normalization argset to all the registered proxies.
static RooNumGenConfig & defaultConfig()
Return reference to instance of default numeric integrator configuration object.
virtual RooArgSet * getAllConstraints(const RooArgSet &observables, RooArgSet &constrainedParams, Bool_t stripDisconnected=kTRUE) const
This helper function finds and collects all constraints terms of all component p.d....
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
const Text_t * getStringAttribute(const Text_t *key) const
Get string attribute mapped under key 'key'.
virtual Int_t numEntries() const
Return number of entries in dataset, i.e., count unweighted entries.
virtual void Add(TObject *arg)
virtual void enableOffsetting(Bool_t)
virtual void constOptimizeTestStatistic(ConstOpCode opcode, Bool_t doAlsoTrackingOpt=kTRUE)
Interface function signaling a request to perform constant term optimization.
void plotOnCompSelect(RooArgSet *selNodes) const
Helper function for plotting of composite p.d.fs.
void SetName(const char *name)
Change the name of the RooDataHist.
void logBatchComputationErrors(RooSpan< const double > &outputs, std::size_t begin) const
Scan through outputs and fix+log all nans and negative values.
void operModeHook(RooAbsArg::OperMode)
Dummy implementation.
virtual UInt_t Integer(UInt_t imax)
Returns a random integer uniformly distributed on the interval [ 0, imax-1 ].
virtual TObject * Next()=0
void setInterpolationOrder(Int_t order)
Set interpolation order of RooHistFunct representing cache histogram.
class to compute the Cholesky decomposition of a matrix
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.
std::vector< std::string > tokenise(const std::string &str, const std::string &delims, bool returnEmptyToken=true)
Tokenise the string by splitting at the characters in delims.
RooCmdArg SupNormSet(const RooArgSet &nset)
virtual void printValue(std::ostream &os) const
Print value of p.d.f, also print normalization integral that was last used, if any.
RooNameSet is a utility class that stores the names the objects in a RooArget.
Bool_t 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...
virtual Bool_t hasRange(const char *name) const
Check if variable has a binning with given name.
RooNumGenConfig holds the configuration parameters of the various numeric integrators used by RooReal...
const RooArgSet * getNormVars() const
RooArgSet * getObservables(const RooArgSet &set, Bool_t valueOnly=kTRUE) const
Return the observables of this pdf given a set of observables.
Bool_t addOwnedComponents(const RooArgSet &comps)
Take ownership of the contents of 'comps'.
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 Int_t numEntries() const
Return the number of bins.
virtual Int_t Poisson(Double_t mean)
Generates a random integer N according to a Poisson law.
RooNumGenConfig * _specGeneratorConfig
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&,...
Mother of all ROOT objects.
const char * content() const
RooSpan< const double > getValues(RooBatchCompute::RunContext &evalData, const RooArgSet *normSet) const
Compute batch of values for given input data, and normalise by integrating over the observables in no...
static const char * str(const TNamed *ptr)
Return C++ string corresponding to given TNamed pointer.
static Int_t _verboseEval
RooCmdArg NormRange(const char *rangeNameList)
RooCmdArg Range(const char *rangeName, Bool_t adjustNorm=kTRUE)
RooMinuit is a wrapper class around TFitter/TMinuit that provides a seamless interface between the MI...
Bool_t dependsOn(const RooAbsCollection &serverList, const RooAbsArg *ignoreArg=0, Bool_t valueOnly=kFALSE) const
Test whether we depend on (ie, are served by) any object in the specified collection.
void setNameList(const char *givenList)
RooXYChi2Var implements a simple chi^2 calculation from an unbinned dataset with values x,...
virtual void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Structure printing.
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,...
RooDataSet is a container class to hold unbinned data.
virtual RooDataHist * generateBinned(const RooArgSet &whatVars, Double_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()) const
As RooAbsPdf::generateBinned(const RooArgSet&, const RooCmdArg&,const RooCmdArg&, const RooCmdArg&,...
A Pave (see TPave) with text, lines or/and boxes inside.
RooAbsArg is the common abstract base class for objects that represent a value and a "shape" in RooFi...
static TRandom * randomGenerator()
Return a pointer to a singleton random-number generator implementation.
virtual void setExpectedData(Bool_t)
virtual void Print(Option_t *options=0) const
This method must be overridden when a class wants to print itself.
virtual const char * GetName() const
Returns name of object.
virtual Bool_t selfNormalized() const
Shows if a PDF is self-normalized, which means that no attempt is made to add a normalization term.
RooArgSet * getVariables(Bool_t stripDisconnected=kTRUE) const
Return RooArgSet with all variables (tree leaf nodes of expresssion tree)
RooAbsArg * findServer(const char *name) const
Return server of this with name name. Returns nullptr if not found.
void setBins(Int_t nBins, const char *name=0)
Create a uniform binning under name 'name' for this variable.
RooWorkspace * _myws
Prevent 'AlwaysDirty' mode for this node.
virtual Bool_t syncNormalization(const RooArgSet *dset, Bool_t adjustProxies=kTRUE) const
Verify that the normalization integral cached with this PDF is valid for given set of normalization o...
RooConstraintSum calculates the sum of the -(log) likelihoods of a set of RooAbsPfs that represent co...
RooAbsCategoryLValue is the common abstract base class for objects that represent a discrete value th...
virtual Double_t getLogVal(const RooArgSet *set=0) const
Return the log of the current value with given normalization An error message is printed if the argum...
void ToLower()
Change string to lower-case.
RooRealVar represents a variable that can be changed from the outside.
double fast_log(double x)
RooAbsCollection * selectByAttrib(const char *name, Bool_t value) const
Create a subset of the current collection, consisting only of those elements with the specified attri...
RooMinimizer is a wrapper class around ROOT::Fit:Fitter that provides a seamless interface between th...
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...
RooAbsRealLValue * getPlotVar() const
std::unordered_map< const RooAbsReal *, RooSpan< const double > > spans
Once an object has computed its value(s), the span pointing to the results is registered here.
Data that has to be passed around when evaluating functions / PDFs.
virtual RooAbsReal * createChi2(RooDataHist &data, const RooLinkedList &cmdList)
Create a variable from a histogram and this function.
Int_t * randomizeProtoOrder(Int_t nProto, Int_t nGen, Bool_t resample=kFALSE) const
Return lookup table with randomized access order for prototype events, given nProto prototype data ev...
Bool_t canBeExtended() const
If true, PDF can provide extended likelihood term.
A simple container to hold a batch of data values.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
const TMatrixDSym & covarianceMatrix() const
Return covariance matrix.
std::string contentsString() const
Return comma separated list of contained object names as STL string.
Bool_t getAttribute(const Text_t *name) const
Check if a named attribute is set. By default, all attributes are unset.
virtual Double_t expectedEvents(const RooArgSet *nset) const
Return expected number of events from this p.d.f for use in extended likelihood calculations.
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.