144 RooAbsArg(
name,title), _plotMin(0), _plotMax(0), _plotBins(100),
145 _value(0), _unit(unit), _forceNumInt(
kFALSE), _specIntegratorConfig(0), _selectComp(
kTRUE), _lastNSet(0)
158 Double_t inMaxVal,
const char *unit) :
159 RooAbsArg(
name,title), _plotMin(inMinVal), _plotMax(inMaxVal), _plotBins(100),
160 _value(0), _unit(unit), _forceNumInt(
kFALSE), _specIntegratorConfig(0), _selectComp(
kTRUE), _lastNSet(0)
172 RooAbsArg(other,
name), _plotMin(other._plotMin), _plotMax(other._plotMax),
173 _plotBins(other._plotBins), _value(other._value), _unit(other._unit), _label(other._label),
174 _forceNumInt(other._forceNumInt), _selectComp(other._selectComp), _lastNSet(0)
225 return (
getVal()==value) ;
245 if (!assumeSameType) {
261 if(appendUnit && 0 != strlen(
getUnit())) {
313 auto item = evalData.
spans.find(
this);
314 if (item != evalData.
spans.end()) {
320 std::map<RooFit::Detail::DataKey, RooSpan<const double>> dataSpans;
321 for (
auto const &evalDataItem : evalData.
spans) {
322 dataSpans[evalDataItem.first] = evalDataItem.second;
329 evalData.
spans[
this] = results;
373 <<
"): validation failed: " << value << endl ;
393 const RooArgSet* ,
const char* rangeName)
const
424 if (code==0)
return getVal(normSet) ;
438 coutF(Eval) <<
"RooAbsReal::analyticalIntegral(" <<
GetName() <<
") code " << code <<
" not implemented" << endl ;
499 os <<
indent <<
"--- RooAbsReal ---" << endl;
517 for (
auto const& arg : paramsOfInterest) {
523 name.append(arg->GetName()) ;
567 pc.
process(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) ;
598 if (!rangeName || strchr(rangeName,
',')==0) {
608 for (
const std::string& token : tokens) {
610 components.
add(*compIntegral);
614 title.
Prepend(
"Integral of ") ;
642 title.
Prepend(
"Integral of ") ;
667 title.
Prepend(
"Integral of ") ;
676 if (integrand !=
this) {
684 if (integrand ==
this && iset.
getSize()>0) {
685 coutI(Integration) <<
GetName() <<
" : multidimensional integration over observables with parameterized ranges in terms of other integrated observables detected, using recursive integration strategy to construct final integral" << endl ;
689 integrand = integral ;
697 coutE(Integration) <<
GetName() <<
" : ERROR while defining recursive integral over observables with parameterized integration ranges, please check that integration rangs specify uniquely defined integral " << endl;
706 if (cacheParamsStr && strlen(cacheParamsStr)) {
713 cxcoutD(Caching) <<
"RooAbsReal::createIntObj(" <<
GetName() <<
") INFO: constructing " << cacheParams.
getSize()
714 <<
"-dim value cache for integral over " << iset2 <<
" as a function of " << cacheParams <<
" in range " << (rangeName?rangeName:
"<none>") << endl ;
724 integral = cachedIntegral ;
754 for (
const auto aarg : allObs) {
769 obsWithParamRange.
add(*aarg) ;
770 obsWithFixedRange.
remove(*aarg) ;
771 obsServingAsRangeParams.
add(loBoundObs,
false) ;
772 obsServingAsRangeParams.
add(hiBoundObs,
false) ;
779 RooArgSet obsWithFixedRangeNP(obsWithFixedRange) ;
780 obsWithFixedRangeNP.
remove(obsServingAsRangeParams) ;
783 RooArgSet obsWithParamRangeNP(obsWithParamRange) ;
784 obsWithParamRangeNP.
remove(obsServingAsRangeParams) ;
788 innerObs.
add(obsWithFixedRangeNP) ;
789 innerObs.
add(obsWithParamRangeNP) ;
806 name.Append(
"_Int[") ;
821 name.Append(rangeName) ;
824 }
else if (!omitEmpty) {
825 name.Append(
"_Int[]") ;
828 if (nset && nset->
getSize()>0 ) {
833 name.Append(
"_Norm[") ;
906 for (
const auto arg : dependentVars) {
907 if(!arg->isFundamental() && !
dynamic_cast<const RooAbsLValue*
>(arg)) {
908 coutE(Plotting) <<
ClassName() <<
"::" <<
GetName() <<
":createPlotProjection: variable \"" << arg->GetName()
909 <<
"\" of wrong type: " << arg->ClassName() << endl;
916 <<
"\" is not a dependent and will be ignored." << endl;
921 leafNodes.
replace(*found,*arg);
923 leafNodes.
add(*arg) ;
927 arg->getObservables(&leafNodes, lvDep);
928 for (
const auto lvs : lvDep) {
932 leafNodes.
add(*lvs) ;
939 if(0 != projectedVars && projectedVars->
find(arg->GetName())) {
941 <<
"\" cannot be both a dependent and a projected variable." << endl;
947 if(0 != projectedVars) leafNodes.
remove(*projectedVars,
kTRUE);
952 coutE(Plotting) <<
"RooAbsPdf::createPlotProjection(" <<
GetName() <<
") Couldn't deep-clone PDF, abort," << endl ;
965 delete plotLeafNodes ;
969 if(0 != projectedVars) normSet.
add(*projectedVars);
978 if(0 == projectedVars) projectedVars= ∅
984 title.
Prepend(
"Projection of ");
989 if(0 == projected || !projected->
isValid()) {
990 coutE(Plotting) <<
ClassName() <<
"::" <<
GetName() <<
":createPlotProjection: cannot integrate out ";
993 if(0 != projected)
delete projected;
998 static_cast<RooRealIntegral*
>(projected)->setAllowComponentSelection(
true);
1035 coutE(InputArguments) <<
ClassName() <<
"::" <<
GetName() <<
":fillHistogram: no valid histogram to fill" << endl;
1041 if(hdim != plotVars.
getSize()) {
1042 coutE(InputArguments) <<
ClassName() <<
"::" <<
GetName() <<
":fillHistogram: plotVars has the wrong dimension" << endl;
1050 for(
Int_t index= 0; index < plotVars.
getSize(); index++) {
1055 <<
"\" of type " << var->
ClassName() << endl;
1060 <<
":fillHistogram: WARNING: variable is not an explicit dependent: " << realVar->
GetName() << endl;
1076 if (projectedVars) {
1077 allDeps.
add(*projectedVars) ;
1080 coutE(InputArguments) <<
"RooAbsReal::fillHistogram(" <<
GetName() <<
") error in checkObservables, abort" << endl ;
1088 cxcoutD(Plotting) <<
"RooAbsReal::fillHistogram(" <<
GetName() <<
") plot projection object is " << projected->
GetName() << endl ;
1091 Int_t xbins(0),ybins(1),zbins(1);
1103 assert(0 != zvar && 0 != zaxis);
1104 if (scaleForDensity) {
1112 assert(0 != yvar && 0 != yaxis);
1113 if (scaleForDensity) {
1121 assert(0 != xvar && 0 != xaxis);
1122 if (scaleForDensity) {
1127 coutE(InputArguments) <<
ClassName() <<
"::" <<
GetName() <<
":fillHistogram: cannot fill histogram with "
1128 << hdim <<
" dimensions" << endl;
1135 Int_t xbin(0),ybin(0),zbin(0);
1136 Int_t bins= xbins*ybins*zbins;
1137 for(
Int_t bin= 0; bin < bins; bin++) {
1140 if(bin % (xbins*ybins) == 0) {
1146 if(bin % xbins == 0) {
1147 ybin= (ybin%ybins) + 1;
1152 xbin= (xbin%xbins) + 1;
1156 coutE(InputArguments) <<
"RooAbsReal::fillHistogram: Internal Error!" << endl;
1162 coutW(Plotting) <<
"WARNING: Function evaluation error(s) at coordinates [x]=" << xvar->
getVal() ;
1163 if (hdim==2)
ccoutW(Plotting) <<
" [y]=" << yvar->
getVal() ;
1164 if (hdim==3)
ccoutW(Plotting) <<
" [z]=" << zvar->
getVal() ;
1165 ccoutW(Plotting) << endl ;
1211 coutE(InputArguments) <<
ClassName() <<
"::" <<
GetName() <<
":fillDataHist: no valid RooDataHist to fill" << endl;
1218 coutE(InputArguments) <<
"RooAbsReal::fillDataHist(" <<
GetName() <<
") error in checkObservables, abort" << endl ;
1235 if (showProgress && (i%onePct==0)) {
1236 ccoutP(Eval) <<
"." << flush ;
1239 Double_t binVal = theClone->
getVal(normSet?normSet:obs)*scaleFactor ;
1240 if (correctForBinSize) {
1243 hist->
set(i, binVal, 0.);
1272 strlcpy(buf,varNameList,1024) ;
1273 char* varName = strtok(buf,
",:") ;
1278 varName = strtok(0,
",") ;
1280 varName = strtok(0,
",") ;
1374 pc.
defineInt(
"intBinning",
"IntrinsicBinning",0,2) ;
1375 pc.
defineInt(
"extended",
"Extended",0,2) ;
1379 pc.
defineObject(
"projObs",
"ProjectedObservables",0,0) ;
1382 pc.
defineMutex(
"SelectCompSet",
"SelectCompSpec") ;
1384 pc.
defineMutex(
"IntrinsicBinning",
"BinningName") ;
1385 pc.
defineMutex(
"IntrinsicBinning",
"BinningSpec") ;
1413 if (!pdfSelf && doExtended>0) {
1414 coutW(InputArguments) <<
"RooAbsReal::createHistogram(" <<
GetName() <<
") WARNING extended mode requested for a non-pdf object, ignored" << endl ;
1418 coutW(InputArguments) <<
"RooAbsReal::createHistogram(" <<
GetName() <<
") WARNING extended mode requested for a non-extendable pdf, ignored" << endl ;
1421 if (pdfSelf && doExtended==2) {
1425 const char* compSpec = pc.
getString(
"compSpec") ;
1427 Bool_t haveCompSel = ( (compSpec && strlen(compSpec)>0) || compSet) ;
1430 if (doIntBinning>0) {
1435 if (doIntBinning==1) {
1436 coutW(InputArguments) <<
"RooAbsReal::createHistogram(" <<
GetName()
1437 <<
") WARNING, intrinsic model binning requested for histogram, but model does not define bin boundaries, reverting to default binning"<< endl ;
1440 if (doIntBinning==2) {
1441 coutI(InputArguments) <<
"RooAbsReal::createHistogram(" <<
GetName()
1442 <<
") INFO: Model has intrinsic binning definition, selecting that binning for the histogram"<< endl ;
1445 for (list<double>::iterator it=bl->begin() ; it!=bl->end() ; ++it) { ba[i++] = *it ; }
1446 intBinning =
new RooBinning(bl->size()-1,ba) ;
1452 pc.
stripCmdList(argListCreate,
"Scaling,ProjectedObservables,IntrinsicBinning,SelectCompSet,SelectCompSpec,Extended") ;
1457 argListCreate.
Add(&tmp) ;
1476 branchNodeSet.
remove(*arg) ;
1487 if (dirSelNodes->
getSize()>0) {
1488 coutI(Plotting) <<
"RooAbsPdf::createHistogram(" <<
GetName() <<
") directly selected PDF components: " << *dirSelNodes << endl ;
1494 coutE(Plotting) <<
"RooAbsPdf::createHistogram(" <<
GetName() <<
") ERROR: component selection set " << *compSet <<
" does not match any components of p.d.f." << endl ;
1496 coutE(Plotting) <<
"RooAbsPdf::createHistogram(" <<
GetName() <<
") ERROR: component selection expression '" << compSpec <<
"' does not select any components of p.d.f." << endl ;
1500 delete dirSelNodes ;
1536 for (
unsigned int i = 0; i < branchNodeSet.
size(); ++i) {
1537 const auto arg = branchNodeSet[i];
1539 branchNodeSet.
remove(*arg) ;
1546 for (
const auto arg : branchNodeSet) {
1555 for (
const auto arg : branchNodeSet) {
1556 for (
const auto selNode : *selNodes) {
1557 if (selNode->dependsOn(*arg)) {
1564 for (
const auto arg : branchNodeSet) {
1565 if (arg->dependsOn(*selNodes)) {
1570 tmp.
remove(*selNodes,
true);
1573 coutI(Plotting) <<
"RooAbsPdf::plotOn(" <<
GetName() <<
") indirectly selected PDF components: " << tmp << endl ;
1576 for (
const auto arg : branchNodeSet) {
1577 Bool_t select = selNodes->
find(arg->GetName()) !=
nullptr;
1728 argList.
Add(&rnorm) ;
1730 std::vector<string> rlist;
1734 rlist.emplace_back(rangeNameToken);
1737 for (
const auto& rangeString : rlist) {
1739 rcmd->
setString(0, rangeString.c_str());
1750 pc.
defineString(
"curveNameSuffix",
"CurveNameSuffix",0,
"") ;
1764 pc.
defineInt(
"doEvalError",
"EvalErrorValue",0,0) ;
1765 pc.
defineInt(
"shiftToZero",
"ShiftToZero",0,0) ;
1770 pc.
defineSet(
"errorPars",
"VisualizeError",0) ;
1771 pc.
defineInt(
"linearMethod",
"VisualizeError",0,0) ;
1772 pc.
defineInt(
"binProjData",
"ProjData",0,0) ;
1775 pc.
defineInt(
"numee",
"PrintEvalErrors",0,10) ;
1776 pc.
defineInt(
"rangeAdjustNorm",
"Range",0,0) ;
1777 pc.
defineInt(
"rangeWNAdjustNorm",
"RangeWithName",0,0) ;
1781 pc.
defineInt(
"markerColor",
"MarkerColor",0,-999) ;
1782 pc.
defineInt(
"markerStyle",
"MarkerStyle",0,-999) ;
1784 pc.
defineInt(
"lineColor",
"LineColor",0,-999) ;
1785 pc.
defineInt(
"lineStyle",
"LineStyle",0,-999) ;
1786 pc.
defineInt(
"lineWidth",
"LineWidth",0,-999) ;
1787 pc.
defineInt(
"fillColor",
"FillColor",0,-999) ;
1788 pc.
defineInt(
"fillStyle",
"FillStyle",0,-999) ;
1790 pc.
defineInt(
"curveInvisible",
"Invisible",0,0) ;
1791 pc.
defineInt(
"showProg",
"ShowProgress",0,0) ;
1793 pc.
defineInt(
"interleave",
"NumCPU",1,0) ;
1797 pc.
defineInt(
"moveToBack",
"MoveToBack",0,0) ;
1801 pc.
defineMutex(
"VisualizeError",
"VisualizeErrorData") ;
1816 if (!drawOpt.
Contains(
"P") && errFR) {
1843 const char* sliceCatState = pc.
getString(
"sliceCatState",0,
kTRUE) ;
1845 if (sliceCatState) {
1854 auto iter = sliceCatList.
begin();
1855 for (
unsigned int i=0; i < catTokens.size(); ++i) {
1856 if (
auto scat =
static_cast<RooCategory*
>(*iter)) {
1858 scat->setLabel(catTokens[i]) ;
1873 if (vlines==2) vlines=0 ;
1879 if (vlines==2) vlines=0 ;
1899 coutE(InputArguments) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") cannot find existing curve " << o.
addToCurveName <<
" to add to in RooPlot" << endl ;
1905 cxcoutD(Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") Preprocessing: have slice " << *sliceSet << endl ;
1910 for (
const auto sliceArg : *sliceSet) {
1913 projectedVars.
remove(*arg) ;
1915 coutI(Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") slice variable "
1916 << sliceArg->GetName() <<
" was not projected anyway" << endl ;
1919 }
else if (projSet) {
1920 cxcoutD(Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") Preprocessing: have projSet " << *projSet << endl ;
1923 cxcoutD(Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") Preprocessing: have neither sliceSet nor projSet " << endl ;
1928 cxcoutD(Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") Preprocessing: projectedVars = " << projectedVars << endl ;
1960 if ((fillColor != -999 || fillStyle != -999) && !drawOpt.
Contains(
"F")) {
1961 coutW(Plotting) <<
"Fill color or style was set for plotting \"" <<
GetName()
1962 <<
"\", but these only have an effect when 'DrawOption(\"F\")' for fill is used at the same time." << std::endl;
2002 cxcoutD(Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") have ProjData with observables = " << *o.
projData->
get() << endl ;
2005 projDataVars.
add(*tmp) ;
2006 cxcoutD(Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") have ProjDataSet = " << *o.
projDataSet <<
" will only use this subset of projData" << endl ;
2009 cxcoutD(Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") using full ProjData" << endl ;
2014 cxcoutD(Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") ProjDataVars = " << projDataVars << endl ;
2020 cxcoutD(Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") have input projSet = " << *o.
projSet << endl ;
2022 cxcoutD(Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") calculated projectedVars = " << *o.
projSet << endl ;
2029 cxcoutD(Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") frame->getNormVars() that are also observables = " << sliceSetTmp << endl ;
2040 if (!sliceSetTmp.
empty()) {
2041 coutI(Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") plot on "
2042 << frame->
getPlotVar()->
GetName() <<
" represents a slice in " << sliceSetTmp << endl ;
2044 sliceSet.
add(sliceSetTmp) ;
2050 cxcoutD(Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") projectedVars = " << projectedVars <<
" sliceSet = " << sliceSet << endl ;
2063 if (!plotCloneSet) {
2064 coutE(Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") Couldn't deep-clone self, abort," << endl ;
2070 if (projectedVars.
getSize()) {
2071 coutI(Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") plot on " << plotVar->
GetName()
2072 <<
" integrates over variables " << projectedVars
2075 if (projDataNeededVars && projDataNeededVars->
getSize()>0) {
2076 coutI(Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") plot on " << plotVar->
GetName()
2077 <<
" averages using data variables " << *projDataNeededVars << endl ;
2086 if (projDataNeededVars) {
2090 deps.
add(*plotVar) ;
2096 coutE(Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") error in checkObservables, abort" << endl ;
2097 delete plotCloneSet ;
2098 if (projDataNeededVars)
delete projDataNeededVars ;
2106 cxcoutD(Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") plot projection object is " << projection->
GetName() << endl ;
2113 fullNormSet.
add(projectedVars) ;
2114 if (projDataNeededVars && projDataNeededVars->
getSize()>0) {
2115 fullNormSet.
add(*projDataNeededVars) ;
2131 if (o.
projData && projDataNeededVars && projDataNeededVars->
getSize()>0) {
2141 if (sliceDataSet->
getSize()>0) {
2162 delete sliceDataSet ;
2164 if (!cutString.
IsNull()) {
2166 coutI(Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") reducing given projection dataset to entries with " << cutString << endl ;
2171 <<
") only the following components of the projection data will be used: " << *projDataNeededVars << endl ;
2187 coutI(Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") unbinned projection dataset consist only of discrete variables,"
2188 <<
" performing projection with binned copy for optimization." << endl ;
2196 if (projDataSel!=o.
projData)
delete projDataSel ;
2203 projection->
getVal(projDataSel->
get()) ;
2211 std::move(cfg),
true) ;
2265 if (projDataSel!=o.
projData)
delete projDataSel ;
2348 if (projDataNeededVars)
delete projDataNeededVars ;
2349 delete projectionCompList ;
2350 delete plotCloneSet ;
2372 projectedVars.
remove(*arg) ;
2374 coutI(Plotting) <<
"RooAbsReal::plotSliceOn(" <<
GetName() <<
") slice variable "
2375 << sliceArg->
GetName() <<
" was not projected anyway" << endl ;
2418 projDataVars.
add(*tmp) ;
2427 coutE(Plotting) <<
"RooAbsReal::plotAsymOn(" <<
GetName()
2428 <<
") function doesn't depend on asymmetry category " << asymCat.
GetName() << endl ;
2434 coutE(Plotting) <<
"RooAbsReal::plotAsymOn(" <<
GetName()
2435 <<
") asymmetry category must have 2 or 3 states with index values -1,0,1" << endl ;
2458 if (!sliceSetTmp.
empty()) {
2459 coutI(Plotting) <<
"RooAbsReal::plotAsymOn(" <<
GetName() <<
") plot on "
2460 << frame->
getPlotVar()->
GetName() <<
" represents a slice in " << sliceSetTmp << endl ;
2462 sliceSet.
add(sliceSetTmp) ;
2486 if (projectedVars.
getSize()) {
2487 coutI(Plotting) <<
"RooAbsReal::plotAsymOn(" <<
GetName() <<
") plot on " << plotVar->
GetName()
2488 <<
" projects variables " << projectedVars << endl ;
2490 if (projDataNeededVars && projDataNeededVars->
getSize()>0) {
2491 coutI(Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") plot on " << plotVar->
GetName()
2492 <<
" averages using data variables "<< *projDataNeededVars << endl ;
2511 RooArgSet *posProjCompList, *negProjCompList ;
2517 depPos.
add(projDataVars) ;
2518 depNeg.
add(projDataVars) ;
2522 if (!posProj || !negProj) {
2523 coutE(Plotting) <<
"RooAbsReal::plotAsymOn(" <<
GetName() <<
") Unable to create projections, abort" << endl ;
2529 asymName.
Append(
"_Asym[") ;
2533 asymTitle.
Append(
" Asymmetry of ") ;
2546 if (sliceDataSet->
getSize()>0) {
2567 delete sliceDataSet ;
2569 if (!cutString.
IsNull()) {
2571 coutI(Plotting) <<
"RooAbsReal::plotAsymOn(" <<
GetName()
2572 <<
") reducing given projection dataset to entries with " << cutString << endl ;
2576 coutI(Plotting) <<
"RooAbsReal::plotAsymOn(" <<
GetName()
2577 <<
") only the following components of the projection data will be used: " << *projDataNeededVars << endl ;
2585 std::move(cfg),
true) ;
2591 ((
RooAbsReal*)posProj)->attachDataSet(*projDataSel) ;
2592 ((
RooAbsReal*)negProj)->attachDataSet(*projDataSel) ;
2626 if (projDataSel!=o.
projData)
delete projDataSel ;
2665 delete posProjCompList ;
2666 delete negProjCompList ;
2700 fpf_stripped.
add(*frv);
2707 cloneFunc->getObservables(&fpf_stripped, errorParams);
2710 if (nset_in.
empty()) {
2711 cloneFunc->getParameters(&errorParams, nset);
2713 cloneFunc->getObservables(&nset_in, nset);
2719 vector<int> fpf_idx;
2723 paramList.
add(*par);
2724 fpf_idx.push_back(i);
2728 vector<Double_t> plusVar, minusVar ;
2735 for (
Int_t ivar=0 ; ivar<paramList.
getSize() ; ivar++) {
2740 Double_t errVal = sqrt(V(ivar,ivar)) ;
2743 ((
RooRealVar*)paramList.
at(ivar))->setVal(cenVal+errVal) ;
2744 plusVar.push_back(cloneFunc->getVal(nset)) ;
2747 ((
RooRealVar*)paramList.
at(ivar))->setVal(cenVal-errVal) ;
2748 minusVar.push_back(cloneFunc->getVal(nset)) ;
2754 vector<double> errVec(paramList.
getSize()) ;
2755 for (
int i=0 ; i<paramList.
getSize() ; i++) {
2756 errVec[i] = sqrt(V(i,i)) ;
2757 for (
int j=i ; j<paramList.
getSize() ; j++) {
2758 C(i,j) = V(i,j)/sqrt(V(i,i)*V(j,j)) ;
2765 for (
unsigned int j=0 ; j<plusVar.size() ; j++) {
2766 F[j] = (plusVar[j]-minusVar[j])/2 ;
2821 pc.
stripCmdList(plotArgListTmp,
"VisualizeError,MoveToBack") ;
2825 for (
auto * cmd : static_range_cast<RooCmdArg*>(plotArgListTmp)) {
2826 if (std::string(
"Normalization")==cmd->GetName()) {
2829 plotArgList.
Add(cmd) ;
2832 plotArgList.
Add(cmd) ;
2841 coutE(Plotting) <<
ClassName() <<
"::" <<
GetName() <<
":plotOnWithErrorBand: no curve for central value available" << endl;
2868 coutI(Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") INFO: visualizing " << Z <<
"-sigma uncertainties in parameters "
2869 << errorParams <<
" from fit result " << fr.
GetName() <<
" using " <<
n <<
" samplings." << endl ;
2875 vector<RooCurve*> cvec ;
2876 for (
int i=0 ; i<
d->numEntries() ; i++) {
2877 cloneParams.
assign(*
d->get(i)) ;
2879 cloneFunc->
plotOn(frame,tmp2) ;
2880 cvec.push_back(frame->
getCurve()) ;
2893 for (vector<RooCurve*>::iterator i=cvec.begin() ; i!=cvec.end() ; ++i) {
2915 fpf_stripped.
add(*frv);
2933 vector<int> fpf_idx ;
2937 paramList.
add(*par) ;
2938 fpf_idx.push_back(i) ;
2942 vector<RooCurve*> plusVar, minusVar ;
2951 for (
Int_t ivar=0 ; ivar<paramList.
getSize() ; ivar++) {
2956 Double_t errVal = sqrt(V(ivar,ivar)) ;
2959 ((
RooRealVar*)paramList.
at(ivar))->setVal(cenVal+Z*errVal) ;
2963 cloneFunc->
plotOn(frame,tmp2) ;
2964 plusVar.push_back(frame->
getCurve()) ;
2969 ((
RooRealVar*)paramList.
at(ivar))->setVal(cenVal-Z*errVal) ;
2971 cloneFunc->
plotOn(frame,tmp3) ;
2972 minusVar.push_back(frame->
getCurve()) ;
2979 vector<double> errVec(paramList.
getSize()) ;
2980 for (
int i=0 ; i<paramList.
getSize() ; i++) {
2981 errVec[i] = sqrt(V(i,i)) ;
2982 for (
int j=i ; j<paramList.
getSize() ; j++) {
2983 C(i,j) = V(i,j)/sqrt(V(i,i)*V(j,j)) ;
2993 for (vector<RooCurve*>::iterator i=plusVar.begin() ; i!=plusVar.end() ; ++i) {
2996 for (vector<RooCurve*>::iterator i=minusVar.begin() ; i!=minusVar.end() ; ++i) {
3003 if (!band)
return frame ;
3007 pc.
defineString(
"curveNameSuffix",
"CurveNameSuffix",0,
"") ;
3008 pc.
defineInt(
"lineColor",
"LineColor",0,-999) ;
3009 pc.
defineInt(
"lineStyle",
"LineStyle",0,-999) ;
3010 pc.
defineInt(
"lineWidth",
"LineWidth",0,-999) ;
3011 pc.
defineInt(
"markerColor",
"MarkerColor",0,-999) ;
3012 pc.
defineInt(
"markerStyle",
"MarkerStyle",0,-999) ;
3014 pc.
defineInt(
"fillColor",
"FillColor",0,-999) ;
3015 pc.
defineInt(
"fillStyle",
"FillStyle",0,-999) ;
3017 pc.
defineInt(
"curveInvisible",
"Invisible",0,0) ;
3018 pc.
defineInt(
"moveToBack",
"MoveToBack",0,0) ;
3084 <<
":plotOn: frame does not specify a plot variable" << endl;
3097 coutE(Plotting) <<
ClassName() <<
"::" <<
GetName() <<
":plotOn: WARNING: variable is not an explicit dependent: "
3118 cxcoutD(Plotting) <<
"RooAbsReal::makeProjectionSet(" <<
GetName() <<
") plotVar = " << plotVar->
GetName()
3119 <<
" allVars = " << (allVars?(*allVars):
RooArgSet()) << endl ;
3122 if (!allVars) return ;
3125 projectedVars.
add(*allVars) ;
3130 projectedVars.
remove(*found);
3139 cxcoutD(Plotting) <<
"RooAbsReal::makeProjectionSet(" <<
GetName() <<
") removing " << tmp->
GetName()
3140 <<
" from projection set because it a server of " << plotVar->
GetName() << endl ;
3141 projectedVars.
remove(*tmp) ;
3145 delete plotServers ;
3149 <<
") WARNING: cannot project out frame variable ("
3150 << found->
GetName() <<
"), ignoring" << endl ;
3162 <<
") function doesn't depend on projection variable "
3163 << arg->
GetName() <<
", ignoring" << endl ;
3202 if(binding && !binding->
isValid()) {
3203 coutE(InputArguments) <<
ClassName() <<
"::" <<
GetName() <<
":bindVars: cannot bind to " << vars << endl ;
3225 auto other =
static_cast<const RooAbsReal*
>(source);
3226 assert(
dynamic_cast<const RooAbsReal*
>(source));
3249 operator double()
override {
3260std::unique_ptr<TreeReadBuffer> createTreeReadBuffer(
const TString& branchName,
TTree&
tree) {
3261 auto buf =
new TypedTreeReadBuffer<T>();
3262 tree.SetBranchAddress(branchName.
Data(), &buf->_value);
3263 return std::unique_ptr<TreeReadBuffer>(buf);
3293 coutE(Eval) <<
"RooAbsReal::attachToTree(" <<
GetName() <<
") ERROR: TTree branch " <<
GetName()
3294 <<
" is an array and cannot be attached to a RooAbsReal" << endl ;
3304 std::map<std::string, std::pair<std::string, std::function<std::unique_ptr<TreeReadBuffer>()>>> typeMap {
3305 {
"Float_t", {
"FLOAT_TREE_BRANCH", [&](){
return createTreeReadBuffer<Float_t >(cleanName, t); }}},
3306 {
"Int_t", {
"INTEGER_TREE_BRANCH", [&](){
return createTreeReadBuffer<Int_t >(cleanName, t); }}},
3307 {
"UChar_t", {
"BYTE_TREE_BRANCH", [&](){
return createTreeReadBuffer<UChar_t >(cleanName, t); }}},
3308 {
"Bool_t", {
"BOOL_TREE_BRANCH", [&](){
return createTreeReadBuffer<Bool_t >(cleanName, t); }}},
3309 {
"Char_t", {
"SIGNEDBYTE_TREE_BRANCH", [&](){
return createTreeReadBuffer<Char_t >(cleanName, t); }}},
3310 {
"UInt_t", {
"UNSIGNED_INTEGER_TREE_BRANCH", [&](){
return createTreeReadBuffer<UInt_t >(cleanName, t); }}},
3311 {
"Long64_t", {
"LONG_TREE_BRANCH", [&](){
return createTreeReadBuffer<Long64_t >(cleanName, t); }}},
3312 {
"ULong64_t", {
"UNSIGNED_LONG_TREE_BRANCH", [&](){
return createTreeReadBuffer<ULong64_t>(cleanName, t); }}},
3313 {
"Short_t", {
"SHORT_TREE_BRANCH", [&](){
return createTreeReadBuffer<Short_t >(cleanName, t); }}},
3314 {
"UShort_t", {
"UNSIGNED_SHORT_TREE_BRANCH", [&](){
return createTreeReadBuffer<UShort_t >(cleanName, t); }}},
3317 auto typeDetails = typeMap.find(typeName.
Data());
3318 if (typeDetails != typeMap.end()) {
3319 coutI(DataHandling) <<
"RooAbsReal::attachToTree(" <<
GetName() <<
") TTree " << typeDetails->first <<
" branch " <<
GetName()
3320 <<
" will be converted to double precision." << endl ;
3330 coutE(InputArguments) <<
"RooAbsReal::attachToTree(" <<
GetName() <<
") data type " << typeName <<
" is not supported." << endl ;
3493 const TList &nameList)
const
3502 matched.
add(*found);
3516 if(isMatched) matchedArgs.
add(matched);
3565 if (config)
return config ;
3578 if (config)
return config ;
3680 if (inLogEvalError) {
3683 inLogEvalError =
kTRUE ;
3688 if (serverValueString) {
3693 oocoutE((
TObject*)0,Eval) <<
"RooAbsReal::logEvalError(" <<
"<STATIC>" <<
") evaluation error, " << endl
3694 <<
" origin : " << origName << endl
3695 <<
" message : " << ee.
_msg << endl
3696 <<
" server values: " << ee.
_srvval << endl ;
3703 inLogEvalError =
kFALSE ;
3735 if (inLogEvalError) {
3738 inLogEvalError =
kTRUE ;
3743 if (serverValueString) {
3763 ostringstream oss2 ;
3767 coutE(Eval) <<
"RooAbsReal::logEvalError(" <<
GetName() <<
") evaluation error, " << endl
3768 <<
" origin : " << oss2.str() << endl
3769 <<
" message : " << ee.
_msg << endl
3770 <<
" server values: " << ee.
_srvval << endl ;
3779 <<
") delayed evaluation error, " << endl
3780 <<
" origin : " << oss2.str() << endl
3781 <<
" message : " << oee.
_msg << endl
3782 <<
" server values: " << oee.
_srvval << endl ;
3789 inLogEvalError =
kFALSE ;
3845 if (maxPerNode<0) return ;
3847 map<const RooAbsArg*,pair<string,list<EvalError> > >::iterator iter =
_evalErrorList.begin() ;
3850 if (maxPerNode==0) {
3853 os << iter->second.first ;
3855 os <<
" has " << iter->second.second.size() <<
" errors" << endl ;
3860 os << iter->second.first << endl ;
3864 std::list<EvalError>::iterator iter2 = iter->second.second.begin() ;
3865 for(;iter2!=iter->second.second.end() ; ++iter2, i++) {
3866 os <<
" " << iter2->_msg <<
" @ " << iter2->_srvval << endl ;
3868 os <<
" ... (remaining " << iter->second.second.size() - maxPerNode <<
" messages suppressed)" << endl ;
3888 map<const RooAbsArg*,pair<string,list<EvalError> > >::iterator iter =
_evalErrorList.begin() ;
3890 ntot += iter->second.second.size() ;
3965 orderedObs.
add(obs) ;
4024 pc.
defineInt(
"numScanBins",
"ScanParameters",0,1000) ;
4025 pc.
defineInt(
"intOrder",
"ScanParameters",1,2) ;
4026 pc.
defineInt(
"doScanNum",
"ScanNum",0,1) ;
4027 pc.
defineInt(
"doScanAll",
"ScanAll",0,0) ;
4028 pc.
defineInt(
"doScanNon",
"ScanNone",0,0) ;
4032 pc.
process(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) ;
4062 coutI(NumIntegration) <<
"RooAbsPdf::createRunningIntegral(" <<
GetName() <<
") integration over observable(s) " << iset <<
" involves numeric integration," << endl
4063 <<
" constructing cdf though numeric integration of sampled pdf in " << numScanBins <<
" bins and applying order "
4064 << intOrder <<
" interpolation on integrated histogram." << endl
4065 <<
" To override this choice of technique use argument ScanNone(), to change scan parameters use ScanParameters(nbins,order) argument" << endl ;
4083 ivar->
setBins(numScanBins,
"numcdf") ;
4106 coutW(InputArguments) <<
"RooAbsPdf::createRunningIntegral(" <<
GetName() <<
") WARNING ignoring non-RooRealVar input argument " << arg->
GetName() << endl ;
4127 cloneList.
add(*cloneArg) ;
4133 loList.
add(*cloneLo) ;
4166 coutE(InputArguments) <<
"RooAbsReal::functor(" <<
GetName() <<
") ERROR: one or more specified observables are not variables of this p.d.f" << endl ;
4172 coutE(InputArguments) <<
"RooAbsReal::functor(" <<
GetName() <<
") ERROR: one or more specified parameters are not variables of this p.d.f" << endl ;
4193 if (realObs.
size() != obs.
size()) {
4194 coutE(InputArguments) <<
"RooAbsReal::functor(" <<
GetName() <<
") ERROR: one or more specified observables are not variables of this p.d.f" << endl ;
4199 if (realPars.
size() != pars.
size()) {
4200 coutE(InputArguments) <<
"RooAbsReal::functor(" <<
GetName() <<
") ERROR: one or more specified parameters are not variables of this p.d.f" << endl ;
4205 for (
int i=0 ; i<obs.
getSize() ; i++) {
4207 coutE(ObjectHandling) <<
"RooAbsReal::asTF(" <<
GetName() <<
") ERROR: proposed observable " << obs.
at(0)->
GetName() <<
" is not of type RooRealVar" << endl ;
4211 for (
int i=0 ; i<pars.
getSize() ; i++) {
4213 coutE(ObjectHandling) <<
"RooAbsReal::asTF(" <<
GetName() <<
") ERROR: proposed parameter " << pars.
at(0)->
GetName() <<
" is not of type RooRealVar" << endl ;
4245 <<
" observables specified, but a ROOT TFx can only have 1,2 or 3 observables" << endl ;
4250 for (
int i=0 ; i<pars.
getSize() ; i++) {
4280 return new RooDerivative(
name.c_str(),title.c_str(),*
this,obs,normSet,order,eps) ;
4295 string title=
Form(
"%sMoment of order %d of %s w.r.t %s ",(central?
"Central ":
""),order,
GetName(),obs.
GetName()) ;
4297 if (order==2)
return new RooSecondMoment(
name.c_str(),title.c_str(),*
this,obs,central,takeRoot) ;
4298 return new RooMoment(
name.c_str(),title.c_str(),*
this,obs,order,central,takeRoot) ;
4314 string title=
Form(
"%sMoment of order %d of %s w.r.t %s ",(central?
"Central ":
""),order,
GetName(),obs.
GetName()) ;
4316 if (order==1)
return new RooFirstMoment(
name.c_str(),title.c_str(),*
this,obs,normObs,intNormObs) ;
4317 if (order==2)
return new RooSecondMoment(
name.c_str(),title.c_str(),*
this,obs,normObs,central,takeRoot,intNormObs) ;
4318 return new RooMoment(
name.c_str(),title.c_str(),*
this,obs,normObs,order,central,takeRoot,intNormObs) ;
4453 return new RooChi2Var(
name.c_str(),
name.c_str(),*
this,data,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) ;
4478 return createChi2(data,*cmds[0],*cmds[1],*cmds[2],*cmds[3],*cmds[4],*cmds[5],*cmds[6],*cmds[7]) ;
4593 pc.
defineInt(
"integrate",
"Integrate",0,0) ;
4630 pc.
defineInt(
"optConst",
"Optimize",0,1) ;
4634 pc.
defineInt(
"plevel",
"PrintLevel",0,1) ;
4636 pc.
defineInt(
"initHesse",
"InitialHesse",0,0) ;
4640 pc.
defineInt(
"numee",
"PrintEvalErrors",0,10) ;
4662 const char* minType = pc.
getString(
"mintype",
"Minuit") ;
4663 const char* minAlg = pc.
getString(
"minalg",
"minuit") ;
4681 m.setMinimizerType(minType);
4687 m.setPrintEvalErrors(numee) ;
4689 m.setPrintLevel(plevel) ;
4694 m.optimizeConst(optConst);
4705 if (opts.
Contains(
"v"))
m.setVerbose(1) ;
4706 if (opts.
Contains(
"t"))
m.setProfile(1) ;
4708 if (opts.
Contains(
"c"))
m.optimizeConst(1) ;
4711 if (opts.
Contains(
"0"))
m.setStrategy(0) ;
4713 if (opts.
Contains(
"0"))
m.setStrategy(1) ;
4717 ret = (opts.
Contains(
"r")) ?
m.save() : 0 ;
4732 m.setStrategy(strat) ;
4741 m.minimize(minType, minAlg) ;
4751 m.minos(*minosSet) ;
4760 string title =
Form(
"Result of fit of %s ",
GetName()) ;
4761 ret =
m.save(
name.c_str(),title.c_str()) ;
4801 while((arg=iter.
next())) {
4803 coutW(InputArguments) <<
"RooAbsReal::setParameterizeIntegral(" <<
GetName()
4804 <<
") function does not depend on listed parameter " << arg->
GetName() <<
", ignoring" << endl ;
4807 if (plist.size()>0) plist +=
":" ;
4847 std::vector<ServerData> ourServers;
4848 std::size_t dataSize = 1;
4850 for (
auto absArgServer :
servers()) {
4851 if (absArgServer->IsA()->InheritsFrom(RooAbsReal::Class()) && absArgServer->isValueServer(*
this)) {
4852 auto server =
static_cast<RooAbsReal*
>(absArgServer);
4853 ourServers.push_back({server,
4854 server->getValues(evalData, normSet),
4855 server->getVal(normSet),
4856 server->operMode()});
4859 dataSize = std::max(dataSize, ourServers.back().batch.size());
4865 struct RestoreStateRAII {
4866 RestoreStateRAII(std::vector<ServerData>& servers) :
4867 _servers{servers} { }
4869 ~RestoreStateRAII() {
4870 for (
auto& serverData : _servers) {
4871 serverData.server->setCachedValue(serverData.oldValue,
true);
4872 serverData.server->setOperMode(serverData.oldOperMode);
4876 std::vector<ServerData>& _servers;
4877 } restoreState{ourServers};
4883 coutI(FastEvaluations) <<
"The class " << IsA()->GetName() <<
" does not implement the faster batch evaluation interface."
4884 <<
" Consider requesting or implementing it to benefit from a speed up." << std::endl;
4889 auto outputData = evalData.
makeBatch(
this, dataSize);
4891 for (std::size_t i=0; i < outputData.size(); ++i) {
4892 for (
auto& serv : ourServers) {
4893 serv.server->setCachedValue(serv.batch[std::min(i, serv.batch.size()-1)],
false);
4918 std::vector<ServerData> ourServers;
4921 for (
auto server :
servers()) {
4923 auto oldOperMode = server->operMode();
4928 ourServers.push_back({server,
4937 struct RestoreStateRAII {
4938 RestoreStateRAII(std::vector<ServerData>& servers) :
4939 _servers{servers} { }
4941 ~RestoreStateRAII() {
4942 for (
auto& serverData : _servers) {
4943 serverData.server->setCachedValue(serverData.oldValue,
true);
4944 serverData.server->setOperMode(serverData.oldOperMode);
4948 std::vector<ServerData>& _servers;
4949 } restoreState{ourServers};
4955 coutI(FastEvaluations) <<
"The class " <<
ClassName() <<
" does not implement the faster batch evaluation interface."
4956 <<
" Consider requesting or implementing it to benefit from a speed up." << std::endl;
4962 for (std::size_t i=0; i < nEvents; ++i) {
4963 for (
auto& serv : ourServers) {
4964 serv.server->setCachedValue(serv.batch[std::min(i, serv.batch.size()-1)],
false);
4976 const bool tmpFast =
_fast;
4977 const double tmp =
_value;
4979 double fullEval = 0.;
4981 fullEval =
getValV(normalisationSet);
4990 if (std::isfinite(ret) && ( ret != 0. ? (ret - fullEval)/ret : ret - fullEval) > 1.E-9) {
4995 formatter <<
"--> (Scalar computation wrong here:)\n"
4996 <<
GetName() <<
" " <<
this <<
" _fast=" << tmpFast
4997 <<
"\n\tcached _value=" << std::setprecision(16) << tmp
4998 <<
"\n\treturning =" << ret
4999 <<
"\n\trecomputed =" << fullEval
5000 <<
"\n\tnew _value =" <<
_value <<
"] ";
5001 formatter <<
"\nServers:";
5027 auto realServer =
dynamic_cast<RooAbsReal*
>(server);
5036 const auto item = evalData.
spans.find(
this);
5037 if (item == evalData.
spans.end())
5040 auto batch = item->second;
5041 const double value =
getVal(normSet);
5042 const double batchVal = batch.size() == 1 ? batch[0] : batch[evtNo];
5043 const double relDiff = value != 0. ? (value - batchVal)/value : value - batchVal;
5045 if (fabs(relDiff) > relAccuracy && fabs(value) > 1.E-300) {
5047 formatter <<
"--> (Batch computation wrong:)\n";
5049 formatter <<
"\n batch=" << batch.data() <<
" size=" << batch.size() << std::setprecision(17)
5050 <<
"\n batch[" << std::setw(7) << evtNo-1 <<
"]= " << (evtNo > 0 && evtNo - 1 < batch.size() ? std::to_string(batch[evtNo-1]) :
"---")
5051 <<
"\n batch[" << std::setw(7) << evtNo <<
"]= " << batchVal <<
" !!!"
5052 <<
"\n expected ('value'): " << value
5053 <<
"\n eval(unnorm.) : " <<
evaluate()
5054 <<
"\n delta " <<
" = " << value - batchVal
5055 <<
"\n rel delta " <<
" = " << relDiff
5056 <<
"\n _batch[" << std::setw(7) << evtNo+1 <<
"]= " << (batch.size() > evtNo+1 ? std::to_string(batch[evtNo+1]) :
"---");
5060 formatter <<
"\nServers: ";
5062 formatter <<
"\n - ";
5064 formatter << std::setprecision(17);
5066 auto serverAsReal =
dynamic_cast<RooAbsReal*
>(server);
5069 if (serverBatch.size() > evtNo) {
5070 formatter <<
"\n _batch[" << evtNo-1 <<
"]=" << (serverBatch.size() > evtNo-1 ? std::to_string(serverBatch[evtNo-1]) :
"---")
5071 <<
"\n _batch[" << evtNo <<
"]=" << serverBatch[evtNo]
5072 <<
"\n _batch[" << evtNo+1 <<
"]=" << (serverBatch.size() > evtNo+1 ? std::to_string(serverBatch[evtNo+1]) :
"---");
5075 formatter << std::setprecision(17)
5076 <<
"\n getVal()=" << serverAsReal->getVal(normSet);
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
static void indent(ostringstream &buf, int indent_level)
char * Form(const char *fmt,...)
R__EXTERN TSystem * gSystem
std::vector< double > getValues()
void setData(RooAbsData const &data, std::string_view rangeName="", RooAbsCategory const *indexCatForSplitting=nullptr, bool skipZeroWeights=false, bool takeGlobalObservablesFromData=true)
RooAbsArg is the common abstract base class for objects that represent a value and a "shape" in RooFi...
virtual Bool_t checkObservables(const RooArgSet *nset) const
Overloadable function in which derived classes can implement consistency checks of the variables.
virtual RooAbsArg * cloneTree(const char *newname=0) const
Clone tree expression of objects.
RooArgSet * getObservables(const RooArgSet &set, Bool_t valueOnly=kTRUE) const
Given a set of possible observables, return the observables that this PDF depends on.
void setShapeDirty()
Notify that a shape-like property (e.g. binning) has changed.
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 setStringAttribute(const Text_t *key, const Text_t *value)
Associate string 'value' to this object under key 'key'.
void leafNodeServerList(RooAbsCollection *list, const RooAbsArg *arg=0, Bool_t recurseNonDerived=kFALSE) const
Fill supplied list with all leaf nodes of the arg tree, starting with ourself as top node.
virtual void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Implement multi-line detailed printing.
virtual TObject * Clone(const char *newname=0) const
Make a clone of an object using the Streamer facility.
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'.
void treeNodeServerList(RooAbsCollection *list, const RooAbsArg *arg=0, Bool_t doBranch=kTRUE, Bool_t doLeaf=kTRUE, Bool_t valueOnly=kFALSE, Bool_t recurseNonDerived=kFALSE) const
Fill supplied list with nodes of the arg tree, following all server links, starting with ourself as t...
void setAttribute(const Text_t *name, Bool_t value=kTRUE)
Set (default) or clear a named boolean attribute of this object.
RooArgSet * getVariables(Bool_t stripDisconnected=kTRUE) const
Return RooArgSet with all variables (tree leaf nodes of expresssion tree)
static Bool_t _inhibitDirty
const RefCountList_t & servers() const
List of all servers of this object.
void setOperMode(OperMode mode, Bool_t recurseADirty=kTRUE)
Set the operation mode of this node.
void setValueDirty()
Mark the element dirty. This forces a re-evaluation when a value is requested.
TString cleanBranchName() const
Construct a mangled name from the actual name that is free of any math symbols that might be interpre...
Int_t numProxies() const
Return the number of registered proxies.
friend class RooCustomizer
Bool_t dependsOnValue(const RooAbsCollection &serverList, const RooAbsArg *ignoreArg=0) const
Check whether this object depends on values from an element in the serverList.
RooAbsProxy * getProxy(Int_t index) const
Return the nth proxy from the proxy list.
RooAbsArg & operator=(const RooAbsArg &other)
Assign all boolean and string properties of the original object.
Bool_t isValueDirtyAndClear() const
RefCountList_t _serverList
RooArgSet * getComponents() const
Create a RooArgSet with all components (branch nodes) of the expression tree headed by this object.
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.
Bool_t recursiveRedirectServers(const RooAbsCollection &newServerList, Bool_t mustReplaceAll=kFALSE, Bool_t nameChange=kFALSE, Bool_t recurseInNewSet=kTRUE)
Recursively replace all servers with the new servers in newSet.
void attachDataSet(const RooAbsData &set)
Replace server nodes with names matching the dataset variable names with those data set variables,...
void SetName(const char *name)
Set the name of the TNamed.
OperMode operMode() const
Query the operation mode of this node.
RooAbsBinning is the abstract base class for RooRealVar binning definitions.
virtual Bool_t isParameterized() const
Interface function.
virtual RooAbsReal * highBoundFunc() const
Return pointer to RooAbsReal parameterized upper bound, if any.
virtual RooAbsReal * lowBoundFunc() const
Return pointer to RooAbsReal parameterized lower bound, if any.
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...
virtual bool setIndex(value_type index, bool printError=true)=0
Change category state by specifying the index code of the desired state.
RooAbsCategory is the base class for objects that represent a discrete value with a finite number of ...
virtual value_type getCurrentIndex() const
Return index number of current state.
Bool_t isSignType(Bool_t mustHaveZero=kFALSE) const
Determine if category has 2 or 3 states with index values -1,0,1.
virtual void removeAll()
Remove all arguments from our set, deleting them if we own them.
virtual Bool_t replace(const RooAbsArg &var1, const RooAbsArg &var2)
Replace var1 with var2 and return kTRUE for success.
void sort(Bool_t reverse=false)
Sort collection using std::sort and name comparison.
virtual RooAbsArg * addClone(const RooAbsArg &var, Bool_t silent=kFALSE)
Add a clone of the specified argument to list.
virtual TObject * Clone(const char *newname=0) const
Make a clone of an object using the Streamer facility.
RooFIter fwdIterator() const
One-time forward iterator.
bool overlaps(Iterator_t otherCollBegin, Iterator_t otherCollEnd) const
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
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...
virtual Bool_t addOwned(RooAbsArg &var, Bool_t silent=kFALSE)
Add an argument and transfer the ownership to the collection.
Storage_t::size_type size() const
RooAbsArg * first() const
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 ...
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.
virtual Bool_t remove(const RooAbsArg &var, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE)
Remove the specified argument from our list.
TIterator * createIterator(Bool_t 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
RooAbsData * reduce(const RooCmdArg &arg1, 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())
Create a reduced copy of this dataset.
Abstract interface for evaluating a real-valued function of one real variable and performing numerica...
Abstract base class for objects that are lvalues, i.e.
RooAbsMoment represents the first, second, or third order derivative of any RooAbsReal as calculated ...
void constOptimizeTestStatistic(ConstOpCode opcode, Bool_t doAlsoTrackingOpt=kTRUE)
Driver function to propagate constant term optimizations in test statistic.
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&,...
const char * normRange() const
virtual Double_t expectedEvents(const RooArgSet *nset) const
Return expected number of events to be used in calculation of extended likelihood.
virtual ExtendMode extendMode() const
Returns ability of PDF to provide extended likelihood terms.
RooAbsProxy is the abstact interface for proxy classes.
virtual void print(std::ostream &os, Bool_t addContents=kFALSE) const
Print proxy name.
RooAbsRealLValue is the common abstract base class for objects that represent a real value that may a...
virtual Double_t getMax(const char *name=0) const
Get maximum of currently defined range.
virtual const RooAbsBinning & getBinning(const char *name=0, Bool_t verbose=kTRUE, Bool_t createOnTheFly=kFALSE) const =0
Retrive binning configuration with given name or default binning.
virtual Double_t getMin(const char *name=0) const
Get miniminum of currently defined range.
TH1 * createHistogram(const char *name, 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
void setServerValues(const char *tmp)
void setMessage(const char *tmp)
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
void plotOnCompSelect(RooArgSet *selNodes) const
Helper function for plotting of composite p.d.fs.
std::unique_ptr< TreeReadBuffer > _treeReadBuffer
RooGenFunction * iGenFunction(RooRealVar &x, const RooArgSet &nset=RooArgSet())
virtual RooPlot * plotSliceOn(RooPlot *frame, const RooArgSet &sliceSet, Option_t *drawOptions="L", Double_t scaleFactor=1.0, ScaleType stype=Relative, const RooAbsData *projData=0) const
virtual Bool_t readFromStream(std::istream &is, Bool_t compact, Bool_t verbose=kFALSE)
Read object contents from stream (dummy for now)
TH1 * fillHistogram(TH1 *hist, const RooArgList &plotVars, Double_t scaleFactor=1, const RooArgSet *projectedVars=0, Bool_t scaling=kTRUE, const RooArgSet *condObs=0, Bool_t setError=kTRUE) const
Fill the ROOT histogram 'hist' with values sampled from this function at the bin centers.
virtual void selectNormalizationRange(const char *rangeName=0, Bool_t force=kFALSE)
Interface function to force use of a given normalization range to interpret function value.
TString getTitle(Bool_t appendUnit=kFALSE) const
Return this variable's title string.
static Int_t numEvalErrorItems()
static void setHideOffset(Bool_t flag)
RooAbsReal()
coverity[UNINIT_CTOR] Default constructor
virtual Int_t getAnalyticalIntegralWN(RooArgSet &allVars, RooArgSet &analVars, const RooArgSet *normSet, const char *rangeName=0) const
Variant of getAnalyticalIntegral that is also passed the normalization set that should be applied to ...
friend class RooRealBinding
virtual RooSpan< double > evaluateSpan(RooBatchCompute::RunContext &evalData, const RooArgSet *normSet) const
Evaluate this object for a batch/span of data points.
RooAbsReal * createScanRI(const RooArgSet &iset, const RooArgSet &nset, Int_t numScanBins, Int_t intOrder)
Utility function for createRunningIntegral that construct an object implementing the numeric scanning...
virtual Bool_t isIdentical(const RooAbsArg &other, Bool_t assumeSameType=kFALSE) const
Bool_t isSelectedComp() const
If true, the current pdf is a selected component (for use in plotting)
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 ...
virtual RooAbsReal * createChi2(RooDataHist &data, const RooLinkedList &cmdList)
Create a variable from a histogram and this function.
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.
void setParameterizeIntegral(const RooArgSet ¶mVars)
static Bool_t hideOffset()
virtual Double_t evaluate() const =0
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
virtual void setTreeBranchStatus(TTree &t, Bool_t active)
(De)Activate associated tree branch
virtual RooAbsReal * createProfile(const RooArgSet ¶msOfInterest)
Create a RooProfileLL object that eliminates all nuisance parameters in the present function.
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...
virtual std::list< Double_t > * binBoundaries(RooAbsRealLValue &obs, Double_t xlo, Double_t xhi) const
Retrieve bin boundaries if this distribution is binned in obs.
Double_t _DEBUG_getVal(const RooArgSet *normalisationSet) const
Debug version of getVal(), which is slow and does error checking.
Double_t traceEval(const RooArgSet *set) const
Calculate current value of object, with error tracing wrapper.
virtual void copyCache(const RooAbsArg *source, Bool_t valueOnly=kFALSE, Bool_t setValDirty=kTRUE)
Copy the cached value of another RooAbsArg to our cache.
virtual void fixAddCoefRange(const char *rangeName=0, Bool_t force=kTRUE)
Fix the interpretation of the coefficient of any RooAddPdf component in the expression tree headed by...
TH1 * createHistogram(const char *varNameList, Int_t xbins=0, Int_t ybins=0, Int_t zbins=0) const
Create and fill a ROOT histogram TH1, TH2 or TH3 with the values of this function for the variables w...
static EvalErrorIter evalErrorIter()
RooAbsReal & operator=(const RooAbsReal &other)
Assign values, name and configs from another RooAbsReal.
Double_t findRoot(RooRealVar &x, Double_t xmin, Double_t xmax, Double_t yval)
Return value of x (in range xmin,xmax) at which function equals yval.
RooAbsReal * createIntRI(const RooArgSet &iset, const RooArgSet &nset=RooArgSet())
Utility function for createRunningIntegral.
TF1 * asTF(const RooArgList &obs, const RooArgList &pars=RooArgList(), const RooArgSet &nset=RooArgSet()) const
Return a ROOT TF1,2,3 object bound to this RooAbsReal with given definition of observables and parame...
virtual Double_t analyticalIntegralWN(Int_t code, const RooArgSet *normSet, const char *rangeName=0) const
Implements the actual analytical integral(s) advertised by getAnalyticalIntegral.
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.
virtual void attachToVStore(RooVectorDataStore &vstore)
static RooNumIntConfig * defaultIntegratorConfig()
Returns the default numeric integration configuration for all RooAbsReals.
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
virtual void attachToTree(TTree &t, Int_t bufSize=32000)
Attach object to a branch of given TTree.
Bool_t matchArgs(const RooArgSet &allDeps, RooArgSet &numDeps, const RooArgProxy &a) const
Utility function for use in getAnalyticalIntegral().
RooNumIntConfig * _specIntegratorConfig
virtual RooPlot * plotAsymOn(RooPlot *frame, const RooAbsCategoryLValue &asymCat, PlotOpt o) const
static ErrorLoggingMode evalErrorLoggingMode()
Return current evaluation error logging mode.
virtual bool isValidReal(double, bool printError=false) const
Interface function to check if given value is a valid value for this object. Returns true unless over...
void setIntegratorConfig()
Remove the specialized numeric integration configuration associated with this object.
virtual void selectNormalization(const RooArgSet *depSet=0, Bool_t force=kFALSE)
Interface function to force use of a given set of observables to interpret function value.
virtual void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Structure printing.
friend class RooRealIntegral
Double_t getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
RooAbsMoment * moment(RooRealVar &obs, Int_t order, Bool_t central, Bool_t takeRoot)
Return function representing moment of function of given order.
static ErrorLoggingMode _evalErrorMode
Double_t getPropagatedError(const RooFitResult &fr, const RooArgSet &nset=RooArgSet()) const
Calculate error on self by linearly propagating errors on parameters using the covariance matrix from...
static Int_t _evalErrorCount
static void globalSelectComp(Bool_t flag)
Global switch controlling the activation of the selectComp() functionality.
RooAbsArg * createFundamental(const char *newname=0) const
Create a RooRealVar fundamental object with our properties.
std::map< constRooAbsArg *, std::pair< std::string, std::list< EvalError > > >::const_iterator EvalErrorIter
virtual Double_t maxVal(Int_t code) const
Return maximum value for set of observables identified by code assigned in getMaxVal.
static Bool_t _globalSelectComp
Component selection flag for RooAbsPdf::plotCompOn.
RooNumIntConfig * specialIntegratorConfig() const
Returns the specialized integrator configuration for this RooAbsReal.
RooAbsReal * createIntObj(const RooArgSet &iset, const RooArgSet *nset, const RooNumIntConfig *cfg, const char *rangeName) const
Internal utility function for createIntegral() that creates the actual integral object.
void checkBatchComputation(const RooBatchCompute::RunContext &evalData, std::size_t evtNo, const RooArgSet *normSet=nullptr, double relAccuracy=1.E-13) const
Walk through expression tree headed by the this object, and check a batch computation.
static std::map< const RooAbsArg *, std::pair< std::string, std::list< EvalError > > > _evalErrorList
Bool_t plotSanityChecks(RooPlot *frame) const
Utility function for plotOn(), perform general sanity check on frame to ensure safe plotting operatio...
const char * getPlotLabel() const
Get the label associated with the variable.
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 void fillTreeBranch(TTree &t)
Fill the tree branch that associated with this object with its current value.
Bool_t operator==(Double_t value) const
Equality operator comparing to a Double_t.
RooAbsFunc * bindVars(const RooArgSet &vars, const RooArgSet *nset=0, Bool_t clipInvalid=kFALSE) const
Create an interface adaptor f(vars) that binds us to the specified variables (in arbitrary order).
virtual std::list< Double_t > * plotSamplingHint(RooAbsRealLValue &obs, Double_t xlo, Double_t xhi) const
Interface for returning an optional hint for initial sampling points when constructing a curve projec...
static Int_t numEvalErrors()
Return the number of logged evaluation errors since the last clearing.
static void setEvalErrorLoggingMode(ErrorLoggingMode m)
Set evaluation error logging mode.
Bool_t matchArgsByName(const RooArgSet &allArgs, RooArgSet &matchedArgs, const TList &nameList) const
Check if allArgs contains matching elements for each name in nameList.
virtual Double_t analyticalIntegral(Int_t code, const char *rangeName=0) const
Implements the actual analytical integral(s) advertised by getAnalyticalIntegral.
virtual Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=0) const
Interface function getAnalyticalIntergral advertises the analytical integrals that are supported.
virtual void preferredObservableScanOrder(const RooArgSet &obs, RooArgSet &orderedObs) const
Interface method for function objects to indicate their preferred order of observables for scanning t...
void findInnerMostIntegration(const RooArgSet &allObs, RooArgSet &innerObs, const char *rangeName) const
Utility function for createIntObj() that aids in the construct of recursive integrals over functions ...
virtual void computeBatch(cudaStream_t *, double *output, size_t size, RooFit::Detail::DataMap const &) const
Base function for computing multiple values of a RooAbsReal.
void selectComp(Bool_t flag)
static Bool_t _hideOffset
const Text_t * getUnit() const
virtual void printValue(std::ostream &os) const
Print object value.
const RooNumIntConfig * getIntegratorConfig() const
Return the numeric integration configuration used for this object.
virtual bool isValid() const
Check if current value is valid.
RooPlot * plotOnWithErrorBand(RooPlot *frame, const RooFitResult &fr, Double_t Z, const RooArgSet *params, const RooLinkedList &argList, Bool_t method1) const
Plot function or PDF on frame with support for visualization of the uncertainty encoded in the given ...
virtual Double_t getValV(const RooArgSet *normalisationSet=nullptr) const
Return value of object.
static void printEvalErrors(std::ostream &os=std::cout, Int_t maxPerNode=10000000)
Print all outstanding logged evaluation error on the given ostream.
virtual void fixAddCoefNormalization(const RooArgSet &addNormSet=RooArgSet(), Bool_t force=kTRUE)
Fix the interpretation of the coefficient of any RooAddPdf component in the expression tree headed by...
void logEvalError(const char *message, const char *serverValueString=0) const
Log evaluation error message.
static void clearEvalErrorLog()
Clear the stack of evaluation error messages.
RooFunctor * functor(const RooArgList &obs, const RooArgList &pars=RooArgList(), const RooArgSet &nset=RooArgSet()) const
Return a RooFunctor object bound to this RooAbsReal with given definition of observables and paramete...
void makeProjectionSet(const RooAbsArg *plotVar, const RooArgSet *allVars, RooArgSet &projectedVars, Bool_t silent) const
Utility function for plotOn() that constructs the set of observables to project when plotting ourselv...
const RooAbsReal * createPlotProjection(const RooArgSet &depVars, const RooArgSet &projVars, RooArgSet *&cloneSet) const
Utility function for plotOn() that creates a projection of a function or p.d.f to be plotted on a Roo...
void setPlotLabel(const char *label)
Set the label associated with this variable.
virtual ~RooAbsReal()
Destructor.
virtual Int_t getMaxVal(const RooArgSet &vars) const
Advertise capability to determine maximum value of function for given set of observables.
virtual void writeToStream(std::ostream &os, Bool_t compact) const
Write object contents to stream (dummy for now)
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.
virtual Double_t offset() const
RooAbsReal * createRunningIntegral(const RooArgSet &iset, const RooArgSet &nset=RooArgSet())
Calls createRunningIntegral(const RooArgSet&, const RooCmdArg&, const RooCmdArg&, const RooCmdArg&,...
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.
RooArgProxy is the abstract interface for RooAbsArg proxy classes.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
RooArgSet * snapshot(bool deepCopy=true) const
Use RooAbsCollection::snapshot(), but return as RooArgSet.
Class RooBinning is an implements RooAbsBinning in terms of an array of boundary values,...
Implement the abstract 1-dimensional root finding interface using the Brent-Decker method.
virtual Bool_t findRoot(Double_t &result, Double_t xlo, Double_t xhi, Double_t value=0) const
Do the root finding using the Brent-Decker method.
RooCachedReal is an implementation of RooAbsCachedReal that can cache any external RooAbsReal input f...
void setCacheSource(Bool_t flag)
RooCategory is an object to represent discrete states.
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...
static const RooCmdArg & none()
Return reference to null argument.
const char * getString(Int_t idx) const
void setString(Int_t idx, const char *value)
virtual TObject * Clone(const char *newName=0) const
Make a clone of an object using the Streamer facility.
Class RooCmdConfig is a configurable parser for RooCmdArg named arguments.
TObject * getObject(const char *name, TObject *obj=0)
Return TObject property registered with name 'name'.
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...
void defineMutex(const char *argName1, const char *argName2)
Define arguments named argName1 and argName2 mutually exclusive.
Bool_t defineObject(const char *name, const char *argName, Int_t setNum, const TObject *obj=0, Bool_t isArray=kFALSE)
Define TObject property name 'name' mapped to object in slot 'setNum' in RooCmdArg with name argName ...
const char * getString(const char *name, const char *defaultValue="", Bool_t convEmptyToNull=kFALSE)
Return string property registered with name 'name'.
Int_t getInt(const char *name, Int_t defaultValue=0)
Return integer property registered with name 'name'.
const RooLinkedList & getObjectList(const char *name)
Return list of objects registered with name 'name'.
Bool_t defineDouble(const char *name, const char *argName, Int_t doubleNum, Double_t defValue=0.)
Define Double_t property name 'name' mapped to Double_t in slot 'doubleNum' in RooCmdArg with name ar...
Double_t getDouble(const char *name, Double_t defaultValue=0)
Return Double_t property registered with name 'name'.
void allowUndefined(Bool_t flag=kTRUE)
void stripCmdList(RooLinkedList &cmdList, const char *cmdsToPurge)
Utility function that strips command names listed (comma separated) in cmdsToPurge from cmdList.
Bool_t defineSet(const char *name, const char *argName, Int_t setNum, const RooArgSet *set=0)
Define TObject property name 'name' mapped to object in slot 'setNum' in RooCmdArg with name argName ...
Bool_t defineString(const char *name, const char *argName, Int_t stringNum, const char *defValue="", Bool_t appendMode=kFALSE)
Define Double_t property name 'name' mapped to Double_t in slot 'stringNum' in RooCmdArg with name ar...
RooArgSet * getSet(const char *name, RooArgSet *set=0)
Return RooArgSet property registered with name 'name'.
Bool_t ok(Bool_t verbose) const
Return true of parsing was successful.
RooLinkedList filterCmdList(RooLinkedList &cmdInList, const char *cmdNameList, Bool_t removeFromInList=kTRUE)
Utility function to filter commands listed in cmdNameList from cmdInList.
Bool_t process(const RooCmdArg &arg)
Process given RooCmdArg.
Bool_t hasProcessed(const char *cmdName) const
Return true if RooCmdArg with name 'cmdName' has been processed.
A RooCurve is a one-dimensional graphical representation of a real-valued function.
RooCurve * makeErrorBand(const std::vector< RooCurve * > &variations, Double_t Z=1) const
Construct filled RooCurve represented error band that captures alpha% of the variations of the curves...
RooCustomizer is a factory class to produce clones of a prototype composite PDF object with the same ...
void setCloneBranchSet(RooArgSet &cloneBranchSet)
Install the input RooArgSet as container in which all cloned branches will be stored.
void replaceArg(const RooAbsArg &orig, const RooAbsArg &subst)
Replace any occurence of arg 'orig' with arg 'subst'.
void setOwning(Bool_t flag)
RooAbsArg * build(const char *masterCatState, Bool_t verbose=kFALSE)
Build a clone of the prototype executing all registered 'replace' rules and 'split' rules for the mas...
The RooDataHist is a container class to hold N-dimensional binned data.
void set(std::size_t binNumber, double weight, double wgtErr)
Set bin content of bin that was last loaded with get(std::size_t).
double binVolume(std::size_t i) const
Return bin volume of i-th bin.
Int_t numEntries() const override
Return the number of bins.
const RooArgSet * get() const override
Get bin centre of current bin.
RooDataSet is a container class to hold unbinned data.
Class RooDataWeightedAverage calculate a weighted average of a function or p.d.f given a dataset with...
RooDerivative represents the first, second, or third order derivative of any RooAbsReal as calculated...
A one-time forward iterator working on RooLinkedList or RooAbsCollection.
RooAbsArg * next()
Return next element or nullptr if at end.
RooFirstMoment represents the first, second, or third order derivative of any RooAbsReal as calculate...
RooFitResult is a container class to hold the input and output of a PDF fit to a dataset.
const TMatrixDSym & covarianceMatrix() const
Return covariance matrix.
TMatrixDSym reducedCovarianceMatrix(const RooArgList ¶ms) const
Return a reduced covariance matrix (Note that Vred is a simple sub-matrix of V, row/columns are order...
const RooArgList & floatParsFinal() const
Return list of floarting parameters after fit.
RooAbsPdf * createHessePdf(const RooArgSet ¶ms) const
Return a p.d.f that represents the fit result as a multi-variate probability densisty function on the...
auto & at(RooAbsArg const *arg, RooAbsArg const *=nullptr)
Lightweight interface adaptor that exports a RooAbsPdf as a functor.
Lightweight interface adaptor that exports a RooAbsReal as a ROOT::Math::IGenFunction.
A RooHist is a graphical representation of binned data based on the TGraphAsymmErrors class.
RooLinkedList is an collection class for internal use, storing a collection of RooAbsArg pointers in ...
TObject * FindObject(const char *name) const
Return pointer to obejct with given name.
TIterator * MakeIterator(Bool_t forward=kTRUE) const
Create a TIterator for this list.
void Delete(Option_t *o=0)
Remove all elements in collection and delete all elements NB: Collection does not own elements,...
virtual void Add(TObject *arg)
RooLinkedListIterImpl begin() const
RooMinimizer is a wrapper class around ROOT::Fit:Fitter that provides a seamless interface between th...
RooMoment represents the first, second, or third order derivative of any RooAbsReal as calculated (nu...
static RooMsgService & instance()
Return reference to singleton instance.
Bool_t isActive(const RooAbsArg *self, RooFit::MsgTopic facility, RooFit::MsgLevel level)
Check if logging is active for given object/topic/RooFitMsgLevel combination.
Lightweight interface adaptor that exports a RooAbsReal as a ROOT::Math::IMultiGenFunction.
RooNumIntConfig holds the configuration parameters of the various numeric integrators used by RooReal...
static RooNumIntConfig & defaultConfig()
Return reference to instance of default numeric integrator configuration object.
Class RooNumRunningInt is an implementation of RooAbsCachedReal that represents a running integral.
Class RooParamBinning is an implementation of RooAbsBinning that constructs a binning with a range de...
A RooPlot is a plot frame and a container for graphics objects within that frame.
Bool_t drawBefore(const char *before, const char *target)
Change the order in which our contained objects are drawn so that the target object is drawn just bef...
TAttMarker * getAttMarker(const char *name=0) const
Return a pointer to the marker attributes of the named object in this plot, or zero if the named obje...
Double_t GetMinimum(Double_t minval=-FLT_MAX) const
const RooArgSet * getNormVars() const
TAttFill * getAttFill(const char *name=0) const
Return a pointer to the fill attributes of the named object in this plot, or zero if the named object...
virtual void SetMinimum(Double_t minimum=-1111)
Set minimum value of Y axis.
TObject * getObject(Int_t idx) const
Return the name of the object at slot 'idx' in this RooPlot.
RooAbsRealLValue * getPlotVar() const
TAttLine * getAttLine(const char *name=0) const
Return a pointer to the line attributes of the named object in this plot, or zero if the named object...
Double_t GetMaximum(Double_t maxval=FLT_MAX) const
void addPlotable(RooPlotable *plotable, Option_t *drawOptions="", Bool_t invisible=kFALSE, Bool_t refreshNorm=kFALSE)
Add the specified plotable object to our plot.
virtual void SetMaximum(Double_t maximum=-1111)
Set maximum value of Y axis.
TObject * findObject(const char *name, const TClass *clas=0) const
Find the named object in our list of items and return a pointer to it.
RooCurve * getCurve(const char *name=0) const
Return a RooCurve pointer of the named object in this plot, or zero if the named object does not exis...
void remove(const char *name=0, Bool_t deleteToo=kTRUE)
Remove object with given name, or last object added if no name is given.
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,...
Class RooProfileLL implements the profile likelihood estimator for a given likelihood and set of para...
Lightweight interface adaptor that binds a RooAbsReal object to a subset of its servers and present i...
RooRealIntegral performs hybrid numerical/analytical integrals of RooAbsReal objects.
const RooArgSet & numIntRealVars() const
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_t min, Double_t max)
Set a fit or plotting range.
void removeRange(const char *name=0)
Remove range limits for binning with given name. Empty name means default range.
Double_t getError() const
void setBinning(const RooAbsBinning &binning, const char *name=0)
Add given binning under name 'name' with this variable.
virtual TObject * clone(const char *newname) const
virtual void setVal(Double_t value)
Set value of variable to 'value'.
Lightweight RooAbsFunction implementation that applies a constant scale factor to another RooAbsFunc.
RooSecondMoment represents the first, second, or third order derivative of any RooAbsReal as calculat...
A simple container to hold a batch of data values.
void setBuffer(RooAbsReal *real, Double_t *newBuf)
RooVectorDataStore uses std::vectors to store data columns.
RealVector * addReal(RooAbsReal *real)
RooXYChi2Var implements a simple chi^2 calculation from an unbinned dataset with values x,...
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual void SetMarkerColor(Color_t mcolor=1)
Set the marker color.
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
virtual void SetMarkerSize(Size_t msize=1)
Set the marker size.
Class to manage histogram axis.
virtual Double_t GetBinCenter(Int_t bin) const
Return center of bin.
A TTree is a list of TBranches.
TObjArray * GetListOfLeaves()
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
virtual void SetParName(Int_t ipar, const char *name)
Set name of parameter number ipar.
virtual void SetParameter(Int_t param, Double_t value)
A 2-Dim function with parameters.
A 3-Dim function with parameters.
virtual void SetName(const char *name="")
Set graph name.
TH1 is the base class of all histogram classes in ROOT.
virtual Int_t GetNbinsY() const
virtual Int_t GetNbinsZ() const
virtual Int_t GetDimension() const
TAxis * GetXaxis()
Get the behaviour adopted by the object about the statoverflows. See EStatOverflows for more informat...
virtual Int_t GetBin(Int_t binx, Int_t biny=0, Int_t binz=0) const
Return Global bin number corresponding to binx,y,z.
virtual Int_t GetNbinsX() const
virtual void SetBinError(Int_t bin, Double_t error)
Set the bin Error Note that this resets the bin eror option to be of Normal Type and for the non-empt...
virtual void SetBinContent(Int_t bin, Double_t content)
Set bin content see convention for numbering bins in TH1::GetBin In case the bin number is greater th...
Iterator abstract base class.
virtual TObject * Next()=0
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
virtual const char * GetTypeName() const
virtual TLeaf * GetLeafCounter(Int_t &countval) const
Return a pointer to the counter of this leaf (if any) or store the number of elements that the leaf c...
virtual void Add(TObject *obj)
virtual TIterator * MakeIterator(Bool_t dir=kIterForward) const
Return a list iterator.
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
virtual const char * GetTitle() const
Returns title of object.
virtual const char * GetName() const
Returns name of object.
TObject * At(Int_t idx) const
Collectable string class.
Mother of all ROOT objects.
virtual const char * GetName() const
Returns name of object.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
void ToLower()
Change string to lower-case.
int CompareTo(const char *cs, ECaseCompare cmp=kExact) const
Compare a string to char *cs2.
const char * Data() const
TString & Prepend(const char *cs)
TString & Append(const char *cs)
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
virtual void StackTrace()
Print a stack trace.
A TTree represents a columnar dataset.
virtual TBranch * GetBranch(const char *name)
Return pointer to the branch with the given name in this tree or its friends.
virtual Int_t SetBranchAddress(const char *bname, void *add, TBranch **ptr=0)
Change branch address, dealing with clone trees properly.
TBranch * Branch(const char *name, T *obj, Int_t bufsize=32000, Int_t splitlevel=99)
Add a new branch, and infer the data type from the type of obj being passed.
virtual void SetBranchStatus(const char *bname, Bool_t status=1, UInt_t *found=0)
Set branch status to Process or DoNotProcess.
RooCmdArg YVar(const RooAbsRealLValue &var, const RooCmdArg &arg=RooCmdArg::none())
RooCmdArg ZVar(const RooAbsRealLValue &var, const RooCmdArg &arg=RooCmdArg::none())
RooCmdArg SupNormSet(const RooArgSet &nset)
RooCmdArg Binning(const RooAbsBinning &binning)
RooCmdArg NormRange(const char *rangeNameList)
std::vector< std::string > Split(std::string_view str, std::string_view delims, bool skipEmpty=false)
Splits a string at each character in delims.
BatchModeOption
For setting the batch mode flag with the BatchMode() command argument to RooAbsPdf::fitTo();.
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.
Double_t Erfc(Double_t x)
Compute the complementary error function erfc(x).
Bool_t postRangeFracScale
const char * normRangeName
RooFit::MPSplit interleave
const char * projectionRangeName
const RooArgSet * projDataSet
const char * curveNameSuffix
const char * addToCurveName
const RooFitResult * errorFR
const RooArgSet * projSet
const RooAbsData * projData
RooFit::MPSplit interleave
This struct enables passing computation data around between elements of a computation graph.
RooSpan< double > makeBatch(const RooAbsArg *owner, std::size_t size)
Create a writable batch.
std::map< RooFit::Detail::DataKey, std::vector< double > > ownedMemory
Memory owned by this struct. It is associated to nodes in the computation graph using their pointers.
std::map< RooFit::Detail::DataKey, RooSpan< const double > > spans
Once an object has computed its value(s), the span pointing to the results is registered here.
virtual ~TreeReadBuffer()=default
static uint64_t sum(uint64_t i)
static void output(int code)