35 #include <sys/types.h> 107 using namespace std ;
152 Double_t inMaxVal,
const char *unit) :
196 return (
getVal()==value) ;
216 if (!assumeSameType) {
232 if(appendUnit && 0 != strlen(
getUnit())) {
299 <<
"): validation failed: " << value << endl ;
319 const RooArgSet* ,
const char* rangeName)
const 350 if (code==0)
return getVal(normSet) ;
364 coutF(
Eval) <<
"RooAbsReal::analyticalIntegral(" <<
GetName() <<
") code " << code <<
" not implemented" << endl ;
425 os << indent <<
"--- RooAbsReal ---" << endl;
427 if(!unit.IsNull()) unit.Prepend(
' ');
429 os << endl << indent <<
" Plot label is \"" <<
getPlotLabel() <<
"\"" << endl;
514 pc.
process(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) ;
545 if (!rangeName || strchr(rangeName,
',')==0) {
553 TObjArray* oa = TString(rangeName).Tokenize(
",");
559 components.
add(*compIntegral) ;
564 title.Prepend(
"Integral of ") ;
593 title.Prepend(
"Integral of ") ;
617 TString title(integrand->
GetTitle()) ;
618 title.Prepend(
"Integral of ") ;
627 if (integrand !=
this) {
635 if (integrand ==
this && iset.
getSize()>0) {
636 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 ;
640 integrand = integral ;
648 coutE(
Integration) <<
GetName() <<
" : ERROR while defining recursive integral over observables with parameterized integration ranges, please check that integration rangs specify uniquely defined integral " << endl;
657 if (cacheParamsStr && strlen(cacheParamsStr)) {
665 if (cacheParams->
getSize()>0) {
667 <<
"-dim value cache for integral over " << iset2 <<
" as a function of " << *cacheParams <<
" in range " << (rangeName?rangeName:
"<none>") << endl ;
671 cachedIntegral->addOwnedComponents(*integral) ;
672 cachedIntegral->setCacheSource(
kTRUE) ;
674 cachedIntegral->setOperMode(
ADirty) ;
677 integral = cachedIntegral ;
723 obsWithParamRange.
add(*aarg) ;
724 obsWithFixedRange.
remove(*aarg) ;
725 obsServingAsRangeParams.
add(*loBoundObs,
kFALSE) ;
726 obsServingAsRangeParams.
add(*hiBoundObs,
kFALSE) ;
736 RooArgSet obsWithFixedRangeNP(obsWithFixedRange) ;
737 obsWithFixedRangeNP.
remove(obsServingAsRangeParams) ;
740 RooArgSet obsWithParamRangeNP(obsWithParamRange) ;
741 obsWithParamRangeNP.
remove(obsServingAsRangeParams) ;
745 innerObs.
add(obsWithFixedRangeNP) ;
746 innerObs.
add(obsWithParamRangeNP) ;
763 name.Append(
"_Int[") ;
778 name.Append(rangeName) ;
781 }
else if (!omitEmpty) {
782 name.Append(
"_Int[]") ;
785 if (nset && nset->
getSize()>0 ) {
790 name.Append(
"_Norm[") ;
872 assert(0 != dependentIterator);
877 <<
"\" of wrong type: " << arg->
ClassName() << endl;
878 delete dependentIterator;
885 <<
"\" is not a dependent and will be ignored." << endl;
890 leafNodes.
replace(*found,*arg);
892 leafNodes.
add(*arg) ;
902 leafNodes.
add(*lvs) ;
911 if(0 != projectedVars && projectedVars->
find(arg->
GetName())) {
913 <<
"\" cannot be both a dependent and a projected variable." << endl;
914 delete dependentIterator;
920 if(0 != projectedVars) leafNodes.
remove(*projectedVars,
kTRUE);
925 coutE(
Plotting) <<
"RooAbsPdf::createPlotProjection(" <<
GetName() <<
") Couldn't deep-clone PDF, abort," << endl ;
938 delete plotLeafNodes ;
942 if(0 != projectedVars) normSet.
add(*projectedVars);
951 if(0 == projectedVars) projectedVars= ∅
957 title.Prepend(
"Projection of ");
962 if(0 == projected || !projected->
isValid()) {
966 if(0 != projected)
delete projected;
967 delete dependentIterator;
975 projected->
SetName(name.Data()) ;
982 delete dependentIterator;
1018 if(hdim != plotVars.
getSize()) {
1027 for(
Int_t index= 0; index < plotVars.
getSize(); index++) {
1032 <<
"\" of type " << var->
ClassName() << endl;
1037 <<
":fillHistogram: WARNING: variable is not an explicit dependent: " << realVar->
GetName() << endl;
1053 if (projectedVars) {
1054 allDeps.
add(*projectedVars) ;
1068 Int_t xbins(0),ybins(1),zbins(1);
1080 assert(0 != zvar && 0 != zaxis);
1081 if (scaleForDensity) {
1089 assert(0 != yvar && 0 != yaxis);
1090 if (scaleForDensity) {
1098 assert(0 != xvar && 0 != xaxis);
1099 if (scaleForDensity) {
1105 << hdim <<
" dimensions" << endl;
1112 Int_t xbin(0),ybin(0),zbin(0);
1113 Int_t bins= xbins*ybins*zbins;
1114 for(
Int_t bin= 0; bin < bins; bin++) {
1117 if(bin % (xbins*ybins) == 0) {
1123 if(bin % xbins == 0) {
1124 ybin= (ybin%ybins) + 1;
1129 xbin= (xbin%xbins) + 1;
1139 coutW(
Plotting) <<
"WARNING: Function evaluation error(s) at coordinates [x]=" << xvar->
getVal() ;
1212 if (showProgress && (i%onePct==0)) {
1216 Double_t binVal = theClone->
getVal(normSet?normSet:obs)*scaleFactor ;
1217 if (correctForBinSize) {
1244 strlcpy(buf,varNameList,1024) ;
1245 char* varName = strtok(buf,
",:") ;
1250 varName = strtok(0,
",") ;
1252 varName = strtok(0,
",") ;
1341 pc.
defineInt(
"intBinning",
"IntrinsicBinning",0,2) ;
1342 pc.
defineInt(
"extended",
"Extended",0,2) ;
1346 pc.
defineSet(
"projObs",
"ProjectedObservables",0,0) ;
1349 pc.
defineMutex(
"SelectCompSet",
"SelectCompSpec") ;
1351 pc.
defineMutex(
"IntrinsicBinning",
"BinningName") ;
1352 pc.
defineMutex(
"IntrinsicBinning",
"BinningSpec") ;
1380 if (!pdfSelf && doExtended>0) {
1381 coutW(
InputArguments) <<
"RooAbsReal::createHistogram(" <<
GetName() <<
") WARNING extended mode requested for a non-pdf object, ignored" << endl ;
1385 coutW(
InputArguments) <<
"RooAbsReal::createHistogram(" <<
GetName() <<
") WARNING extended mode requested for a non-extendable pdf, ignored" << endl ;
1388 if (pdfSelf && doExtended==2) {
1392 const char* compSpec = pc.
getString(
"compSpec") ;
1394 Bool_t haveCompSel = ( (compSpec && strlen(compSpec)>0) || compSet) ;
1397 if (doIntBinning>0) {
1402 if (doIntBinning==1) {
1404 <<
") WARNING, intrinsic model binning requested for histogram, but model does not define bin boundaries, reverting to default binning"<< endl ;
1407 if (doIntBinning==2) {
1409 <<
") INFO: Model has intrinsic binning definition, selecting that binning for the histogram"<< endl ;
1412 for (list<double>::iterator it=bl->begin() ; it!=bl->end() ; ++it) { ba[i++] = *it ; }
1413 intBinning =
new RooBinning(bl->size()-1,ba) ;
1419 pc.
stripCmdList(argListCreate,
"Scaling,ProjectedObservables,IntrinsicBinning,SelectCompSet,SelectCompSpec,Extended") ;
1424 argListCreate.
Add(&tmp) ;
1442 if (!dynamic_cast<RooAbsReal*>(arg)) {
1443 branchNodeSet.
remove(*arg) ;
1454 if (dirSelNodes->
getSize()>0) {
1455 coutI(
Plotting) <<
"RooAbsPdf::createHistogram(" <<
GetName() <<
") directly selected PDF components: " << *dirSelNodes << endl ;
1461 coutE(
Plotting) <<
"RooAbsPdf::createHistogram(" <<
GetName() <<
") ERROR: component selection set " << *compSet <<
" does not match any components of p.d.f." << endl ;
1463 coutE(
Plotting) <<
"RooAbsPdf::createHistogram(" <<
GetName() <<
") ERROR: component selection expression '" << compSpec <<
"' does not select any components of p.d.f." << endl ;
1467 delete dirSelNodes ;
1505 if (!dynamic_cast<RooAbsReal*>(arg)) {
1506 branchNodeSet.
remove(*arg) ;
1547 selNodes->
add(tmp) ;
1548 coutI(
Plotting) <<
"RooAbsPdf::plotOn(" <<
GetName() <<
") indirectly selected PDF components: " << tmp << endl ;
1707 if (rcmd && TString(rcmd->
getString(0)).Contains(
",")) {
1711 argList.
Add(&rnorm) ;
1713 list<string> rlist ;
1718 char* oneRange = strtok(buf,
",") ;
1720 rlist.push_back(oneRange) ;
1721 oneRange = strtok(0,
",") ;
1724 for (list<string>::iterator riter=rlist.begin() ; riter!=rlist.end() ; ++riter) {
1737 pc.
defineString(
"curveNameSuffix",
"CurveNameSuffix",0,
"") ;
1746 pc.
defineInt(
"doEvalError",
"EvalErrorValue",0,0) ;
1747 pc.
defineInt(
"shiftToZero",
"ShiftToZero",0,0) ;
1752 pc.
defineSet(
"errorPars",
"VisualizeError",0) ;
1753 pc.
defineInt(
"linearMethod",
"VisualizeError",0,0) ;
1754 pc.
defineInt(
"binProjData",
"ProjData",0,0) ;
1757 pc.
defineInt(
"numee",
"PrintEvalErrors",0,10) ;
1758 pc.
defineInt(
"rangeAdjustNorm",
"Range",0,0) ;
1759 pc.
defineInt(
"rangeWNAdjustNorm",
"RangeWithName",0,0) ;
1763 pc.
defineInt(
"lineColor",
"LineColor",0,-999) ;
1764 pc.
defineInt(
"lineStyle",
"LineStyle",0,-999) ;
1765 pc.
defineInt(
"lineWidth",
"LineWidth",0,-999) ;
1766 pc.
defineInt(
"fillColor",
"FillColor",0,-999) ;
1767 pc.
defineInt(
"fillStyle",
"FillStyle",0,-999) ;
1769 pc.
defineInt(
"curveInvisible",
"Invisible",0,0) ;
1770 pc.
defineInt(
"showProg",
"ShowProgress",0,0) ;
1772 pc.
defineInt(
"interleave",
"NumCPU",1,0) ;
1776 pc.
defineInt(
"moveToBack",
"MoveToBack",0,0) ;
1780 pc.
defineMutex(
"VisualizeError",
"VisualizeErrorData") ;
1818 const char* sliceCatState = pc.
getString(
"sliceCatState",0,
kTRUE) ;
1820 if (sliceCatState) {
1829 strlcpy(buf,sliceCatState,1024) ;
1830 const char* slabel = strtok(buf,
",") ;
1842 slabel = strtok(0,
",") ;
1854 if (vlines==2) vlines=0 ;
1860 if (vlines==2) vlines=0 ;
1886 cxcoutD(
Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") Preprocessing: have slice " << *sliceSet << endl ;
1893 while((sliceArg=(
RooAbsArg*)iter->Next())) {
1896 projectedVars.
remove(*arg) ;
1899 << sliceArg->
GetName() <<
" was not projected anyway" << endl ;
1903 }
else if (projSet) {
1904 cxcoutD(
Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") Preprocessing: have projSet " << *projSet << endl ;
1907 cxcoutD(
Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") Preprocessing: have neither sliceSet nor projSet " << endl ;
1912 cxcoutD(
Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") Preprocessing: projectedVars = " << projectedVars << endl ;
1978 projDataVars.
add(*tmp) ;
2001 cxcoutD(
Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") frame->getNormVars() that are also observables = " << *sliceSetTmp << endl ;
2014 << frame->
getPlotVar()->
GetName() <<
" represents a slice in " << *sliceSetTmp << endl ;
2016 sliceSet.
add(*sliceSetTmp) ;
2017 delete sliceSetTmp ;
2023 cxcoutD(
Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") projectedVars = " << projectedVars <<
" sliceSet = " << sliceSet << endl ;
2036 if (!plotCloneSet) {
2037 coutE(
Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") Couldn't deep-clone self, abort," << endl ;
2043 if (projectedVars.
getSize()) {
2045 <<
" integrates over variables " << projectedVars
2048 if (projDataNeededVars && projDataNeededVars->
getSize()>0) {
2050 <<
" averages using data variables " << *projDataNeededVars << endl ;
2058 if (projDataNeededVars) {
2062 deps->
add(*plotVar) ;
2068 coutE(
Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") error in checkObservables, abort" << endl ;
2070 delete plotCloneSet ;
2071 if (projDataNeededVars)
delete projDataNeededVars ;
2086 fullNormSet.
add(projectedVars) ;
2087 if (projDataNeededVars && projDataNeededVars->
getSize()>0) {
2088 fullNormSet.
add(*projDataNeededVars) ;
2104 if (o.
projData && projDataNeededVars && projDataNeededVars->
getSize()>0) {
2114 if (sliceDataSet->
getSize()>0) {
2120 cutString.Append(
"&&") ;
2127 if ((real = dynamic_cast<RooAbsRealLValue*>(sliceVar))) {
2129 }
else if ((cat = dynamic_cast<RooAbsCategoryLValue*>(sliceVar))) {
2135 delete sliceDataSet ;
2137 if (!cutString.IsNull()) {
2139 coutI(
Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") reducing given projection dataset to entries with " << cutString << endl ;
2144 <<
") only the following components of the projection data will be used: " << *projDataNeededVars << endl ;
2148 if (!o.
binProjData && dynamic_cast<RooDataSet*>(projDataSel)!=0) {
2155 if (!dynamic_cast<RooCategory*>(arg2)) allCat =
kFALSE ;
2160 coutI(
Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") unbinned projection dataset consist only of discrete variables," 2161 <<
" performing projection with binned copy for optimization." << endl ;
2169 if (projDataSel!=o.
projData)
delete projDataSel ;
2176 projection->
getVal(projDataSel->
get()) ;
2196 TString curveName(projection->
GetName()) ;
2213 curve->
SetName(curveName.Data()) ;
2234 if (projDataSel!=o.
projData)
delete projDataSel ;
2274 TString curveName(projection->
GetName()) ;
2282 curve->
SetName(curveName.Data()) ;
2303 if (projDataNeededVars)
delete projDataNeededVars ;
2305 delete projectionCompList ;
2306 delete plotCloneSet ;
2325 while((sliceArg=(
RooAbsArg*)iter->Next())) {
2328 projectedVars.
remove(*arg) ;
2331 << sliceArg->
GetName() <<
" was not projected anyway" << endl ;
2374 projDataVars.
add(*tmp) ;
2384 <<
") function doesn't depend on asymmetry category " << asymCat.
GetName() << endl ;
2391 <<
") asymmetry category must have 2 or 3 states with index values -1,0,1" << endl ;
2415 << frame->
getPlotVar()->
GetName() <<
" represents a slice in " << *sliceSetTmp << endl ;
2417 sliceSet.
add(*sliceSetTmp) ;
2418 delete sliceSetTmp ;
2442 if (projectedVars.
getSize()) {
2444 <<
" projects variables " << projectedVars << endl ;
2446 if (projDataNeededVars && projDataNeededVars->getSize()>0) {
2448 <<
" averages using data variables "<< *projDataNeededVars << endl ;
2467 RooArgSet *posProjCompList, *negProjCompList ;
2473 depPos.
add(projDataVars) ;
2474 depNeg.
add(projDataVars) ;
2478 if (!posProj || !negProj) {
2479 coutE(
Plotting) <<
"RooAbsReal::plotAsymOn(" <<
GetName() <<
") Unable to create projections, abort" << endl ;
2485 asymName.Append(
"_Asym[") ;
2486 asymName.Append(asymCat.
GetName()) ;
2487 asymName.Append(
"]") ;
2488 TString asymTitle(asymCat.
GetName()) ;
2489 asymTitle.Append(
" Asymmetry of ") ;
2497 if (projDataNeededVars && projDataNeededVars->getSize()<o.
projData->
get()->
getSize()) {
2502 if (sliceDataSet->
getSize()>0) {
2508 cutString.Append(
"&&") ;
2515 if ((real = dynamic_cast<RooAbsRealLValue*>(sliceVar))) {
2517 }
else if ((cat = dynamic_cast<RooAbsCategoryLValue*>(sliceVar))) {
2523 delete sliceDataSet ;
2525 if (!cutString.IsNull()) {
2528 <<
") reducing given projection dataset to entries with " << cutString << endl ;
2533 <<
") only the following components of the projection data will be used: " << *projDataNeededVars << endl ;
2543 ((
RooAbsReal*)posProj)->attachDataSet(*projDataSel) ;
2544 ((
RooAbsReal*)negProj)->attachDataSet(*projDataSel) ;
2555 TString curveName(funcAsym->
GetName()) ;
2578 if (projDataSel!=o.
projData)
delete projDataSel ;
2597 TString curveName(funcAsym->
GetName()) ;
2605 curve->
SetName(curveName.Data()) ;
2617 delete posProjCompList ;
2618 delete negProjCompList ;
2649 fpf_stripped.
add(*frv);
2663 vector<int> fpf_idx;
2667 paramList.
add(*par);
2668 fpf_idx.push_back(i);
2672 vector<Double_t> plusVar, minusVar ;
2679 for (
Int_t ivar=0 ; ivar<paramList.
getSize() ; ivar++) {
2687 ((
RooRealVar*)paramList.
at(ivar))->setVal(cenVal+errVal) ;
2688 plusVar.push_back(cloneFunc->
getVal(nset)) ;
2691 ((
RooRealVar*)paramList.
at(ivar))->setVal(cenVal-errVal) ;
2692 minusVar.push_back(cloneFunc->
getVal(nset)) ;
2698 vector<double> errVec(paramList.
getSize()) ;
2699 for (
int i=0 ; i<paramList.
getSize() ; i++) {
2700 errVec[i] =
sqrt(V(i,i)) ;
2701 for (
int j=i ; j<paramList.
getSize() ; j++) {
2702 C(i,j) = V(i,j)/
sqrt(V(i,i)*V(j,j)) ;
2709 for (
unsigned int j=0 ; j<plusVar.size() ; j++) {
2710 F[j] = (plusVar[j]-minusVar[j])/2 ;
2717 delete errorParams ;
2759 pc.
stripCmdList(plotArgListTmp,
"VisualizeError,MoveToBack") ;
2766 if (std::string(
"Normalization")==cmd->
GetName()) {
2769 plotArgList.
Add(cmd) ;
2772 plotArgList.
Add(cmd) ;
2799 coutI(
Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") INFO: visualizing " << Z <<
"-sigma uncertainties in parameters " 2800 << *errorParams <<
" from fit result " << fr.
GetName() <<
" using " << n <<
" samplings." << endl ;
2805 RooDataSet*
d = paramPdf->generate(*errorParams,n) ;
2806 vector<RooCurve*> cvec ;
2808 *cloneParams = (*d->
get(i)) ;
2810 cloneFunc->
plotOn(frame,tmp2) ;
2811 cvec.push_back(frame->
getCurve()) ;
2824 for (vector<RooCurve*>::iterator i=cvec.begin() ; i!=cvec.end() ; ++i) {
2846 fpf_stripped.
add(*frv);
2859 vector<int> fpf_idx ;
2863 paramList.add(*par) ;
2864 fpf_idx.push_back(i) ;
2868 vector<RooCurve*> plusVar, minusVar ;
2877 for (
Int_t ivar=0 ; ivar<paramList.getSize() ; ivar++) {
2885 ((
RooRealVar*)paramList.at(ivar))->setVal(cenVal+Z*errVal) ;
2889 cloneFunc->
plotOn(frame,tmp2) ;
2890 plusVar.push_back(frame->
getCurve()) ;
2895 ((
RooRealVar*)paramList.at(ivar))->setVal(cenVal-Z*errVal) ;
2897 cloneFunc->
plotOn(frame,tmp3) ;
2898 minusVar.push_back(frame->
getCurve()) ;
2901 ((
RooRealVar*)paramList.at(ivar))->setVal(cenVal) ;
2905 vector<double> errVec(paramList.getSize()) ;
2906 for (
int i=0 ; i<paramList.getSize() ; i++) {
2907 errVec[i] =
sqrt(V(i,i)) ;
2908 for (
int j=i ; j<paramList.getSize() ; j++) {
2909 C(i,j) = V(i,j)/
sqrt(V(i,i)*V(j,j)) ;
2919 for (vector<RooCurve*>::iterator i=plusVar.begin() ; i!=plusVar.end() ; ++i) {
2922 for (vector<RooCurve*>::iterator i=minusVar.begin() ; i!=minusVar.end() ; ++i) {
2929 if (!band)
return frame ;
2933 pc.
defineString(
"curveNameSuffix",
"CurveNameSuffix",0,
"") ;
2934 pc.
defineInt(
"lineColor",
"LineColor",0,-999) ;
2935 pc.
defineInt(
"lineStyle",
"LineStyle",0,-999) ;
2936 pc.
defineInt(
"lineWidth",
"LineWidth",0,-999) ;
2937 pc.
defineInt(
"fillColor",
"FillColor",0,-999) ;
2938 pc.
defineInt(
"fillStyle",
"FillStyle",0,-999) ;
2940 pc.
defineInt(
"curveInvisible",
"Invisible",0,0) ;
2941 pc.
defineInt(
"moveToBack",
"MoveToBack",0,0) ;
3002 <<
":plotOn: frame does not specify a plot variable" << endl;
3007 if(!dynamic_cast<RooAbsRealLValue*>(var)) {
3037 <<
" allVars = " << (allVars?(*allVars):
RooArgSet()) << endl ;
3040 if (!allVars) return ;
3043 projectedVars.
add(*allVars) ;
3048 projectedVars.
remove(*found);
3058 <<
" from projection set because it a server of " << plotVar->
GetName() << endl ;
3059 projectedVars.
remove(*tmp) ;
3063 delete plotServers ;
3067 <<
") WARNING: cannot project out frame variable (" 3068 << found->
GetName() <<
"), ignoring" << endl ;
3080 <<
") function doesn't depend on projection variable " 3081 << arg->
GetName() <<
", ignoring" << endl ;
3120 if(binding && !binding->
isValid()) {
3144 }
else if (source->
getAttribute(
"INTEGER_TREE_BRANCH")) {
3150 }
else if (source->
getAttribute(
"SIGNEDBYTE_TREE_BRANCH")) {
3152 }
else if (source->
getAttribute(
"UNSIGNED_INTEGER_TREE_BRANCH")) {
3190 TBranch* branch = t.GetBranch(cleanName) ;
3201 <<
" is an array and cannot be attached to a RooAbsReal" << endl ;
3207 if (!typeName.CompareTo(
"Float_t")) {
3209 <<
" will be converted to double precision" << endl ;
3213 }
else if (!typeName.CompareTo(
"Int_t")) {
3215 <<
" will be converted to double precision" << endl ;
3218 t.SetBranchAddress(cleanName,&
_intValue) ;
3219 }
else if (!typeName.CompareTo(
"UChar_t")) {
3221 <<
" will be converted to double precision" << endl ;
3225 }
else if (!typeName.CompareTo(
"Bool_t")) {
3227 <<
" will be converted to double precision" << endl ;
3231 }
else if (!typeName.CompareTo(
"Char_t")) {
3233 <<
" will be converted to double precision" << endl ;
3237 }
else if (!typeName.CompareTo(
"UInt_t")) {
3239 <<
" will be converted to double precision" << endl ;
3243 }
else if (!typeName.CompareTo(
"Double_t")) {
3244 t.SetBranchAddress(cleanName,&
_value) ;
3246 coutE(
InputArguments) <<
"RooAbsReal::attachToTree(" <<
GetName() <<
") data type " << typeName <<
" is not supported" << endl ;
3258 TString format(cleanName);
3259 format.Append(
"/D");
3260 branch = t.Branch(cleanName, &
_value, (
const Text_t*)format, bufSize);
3418 const TList &nameList)
const 3427 matched.
add(*found);
3441 if(isMatched) matchedArgs.
add(matched);
3490 if (config)
return config ;
3503 if (config)
return config ;
3615 if (inLogEvalError) {
3618 inLogEvalError =
kTRUE ;
3623 if (serverValueString) {
3628 oocoutE((
TObject*)0,
Eval) <<
"RooAbsReal::logEvalError(" <<
"<STATIC>" <<
") evaluation error, " << endl
3629 <<
" origin : " << origName << endl
3630 <<
" message : " << ee.
_msg << endl
3631 <<
" server values: " << ee.
_srvval << endl ;
3638 inLogEvalError =
kFALSE ;
3670 if (inLogEvalError) {
3673 inLogEvalError =
kTRUE ;
3678 if (serverValueString) {
3698 ostringstream oss2 ;
3702 coutE(
Eval) <<
"RooAbsReal::logEvalError(" <<
GetName() <<
") evaluation error, " << endl
3703 <<
" origin : " << oss2.str() << endl
3704 <<
" message : " << ee.
_msg << endl
3705 <<
" server values: " << ee.
_srvval << endl ;
3714 <<
") delayed evaluation error, " << endl
3715 <<
" origin : " << oss2.str() << endl
3716 <<
" message : " << oee.
_msg << endl
3717 <<
" server values: " << oee.
_srvval << endl ;
3724 inLogEvalError =
kFALSE ;
3760 if (maxPerNode<0) return ;
3762 map<const RooAbsArg*,pair<string,list<EvalError> > >::iterator iter =
_evalErrorList.begin() ;
3765 if (maxPerNode==0) {
3768 os << iter->second.first ;
3770 os <<
" has " << iter->second.second.size() <<
" errors" << endl ;
3775 os << iter->second.first << endl ;
3779 std::list<EvalError>::iterator iter2 = iter->second.second.begin() ;
3780 for(;iter2!=iter->second.second.end() ; ++iter2, i++) {
3781 os <<
" " << iter2->_msg <<
" @ " << iter2->_srvval << endl ;
3783 os <<
" ... (remaining " << iter->second.second.size() - maxPerNode <<
" messages suppressed)" << endl ;
3803 map<const RooAbsArg*,pair<string,list<EvalError> > >::iterator iter =
_evalErrorList.begin() ;
3805 ntot += iter->second.second.size() ;
3880 orderedObs.
add(obs) ;
3940 pc.
defineInt(
"numScanBins",
"ScanParameters",0,1000) ;
3941 pc.
defineInt(
"intOrder",
"ScanParameters",1,2) ;
3942 pc.
defineInt(
"doScanNum",
"ScanNum",0,1) ;
3943 pc.
defineInt(
"doScanAll",
"ScanAll",0,0) ;
3944 pc.
defineInt(
"doScanNon",
"ScanNone",0,0) ;
3948 pc.
process(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) ;
3978 coutI(
NumIntegration) <<
"RooAbsPdf::createRunningIntegral(" <<
GetName() <<
") integration over observable(s) " << iset <<
" involves numeric integration," << endl
3979 <<
" constructing cdf though numeric integration of sampled pdf in " << numScanBins <<
" bins and applying order " 3980 << intOrder <<
" interpolation on integrated histogram." << endl
3981 <<
" To override this choice of technique use argument ScanNone(), to change scan parameters use ScanParameters(nbins,order) argument" << endl ;
3999 ivar->
setBins(numScanBins,
"numcdf") ;
4019 if (dynamic_cast<RooRealVar*>(arg)) {
4043 cloneList.
add(*cloneArg) ;
4049 loList.
add(*cloneLo) ;
4082 coutE(
InputArguments) <<
"RooAbsReal::functor(" <<
GetName() <<
") ERROR: one or more specified observables are not variables of this p.d.f" << endl ;
4088 coutE(
InputArguments) <<
"RooAbsReal::functor(" <<
GetName() <<
") ERROR: one or more specified parameters are not variables of this p.d.f" << endl ;
4109 coutE(
InputArguments) <<
"RooAbsReal::functor(" <<
GetName() <<
") ERROR: one or more specified observables are not variables of this p.d.f" << endl ;
4115 coutE(
InputArguments) <<
"RooAbsReal::functor(" <<
GetName() <<
") ERROR: one or more specified parameters are not variables of this p.d.f" << endl ;
4123 for (
int i=0 ; i<obs.
getSize() ; i++) {
4124 if (dynamic_cast<RooRealVar*>(obs.
at(i))==0) {
4129 for (
int i=0 ; i<pars.
getSize() ; i++) {
4130 if (dynamic_cast<RooRealVar*>(pars.
at(i))==0) {
4163 <<
" observables specified, but a ROOT TFx can only have 1,2 or 3 observables" << endl ;
4168 for (
int i=0 ; i<pars.
getSize() ; i++) {
4186 return new RooDerivative(name.c_str(),title.c_str(),*
this,obs,order,eps) ;
4198 return new RooDerivative(name.c_str(),title.c_str(),*
this,obs,normSet,order,eps) ;
4210 string title=
Form(
"%sMoment of order %d of %s w.r.t %s ",(central?
"Central ":
""),order,
GetName(),obs.
GetName()) ;
4211 if (order==1)
return new RooFirstMoment(name.c_str(),title.c_str(),*
this,obs) ;
4212 if (order==2)
return new RooSecondMoment(name.c_str(),title.c_str(),*
this,obs,central,takeRoot) ;
4213 return new RooMoment(name.c_str(),title.c_str(),*
this,obs,order,central,takeRoot) ;
4225 string title=
Form(
"%sMoment of order %d of %s w.r.t %s ",(central?
"Central ":
""),order,
GetName(),obs.
GetName()) ;
4227 if (order==1)
return new RooFirstMoment(name.c_str(),title.c_str(),*
this,obs,normObs,intNormObs) ;
4228 if (order==2)
return new RooSecondMoment(name.c_str(),title.c_str(),*
this,obs,normObs,central,takeRoot,intNormObs) ;
4229 return new RooMoment(name.c_str(),title.c_str(),*
this,obs,normObs,order,central,takeRoot,intNormObs) ;
4361 return new RooChi2Var(name.c_str(),name.c_str(),*
this,
data,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) ;
4385 return createChi2(data,*cmds[0],*cmds[1],*cmds[2],*cmds[3],*cmds[4],*cmds[5],*cmds[6],*cmds[7]) ;
4504 pc.
defineInt(
"integrate",
"Integrate",0,0) ;
4520 return new RooXYChi2Var(name.c_str(),name.c_str(),*
this,
data,*yvar,integrate) ;
4541 pc.
defineInt(
"optConst",
"Optimize",0,1) ;
4545 pc.
defineInt(
"plevel",
"PrintLevel",0,1) ;
4547 pc.
defineInt(
"initHesse",
"InitialHesse",0,0) ;
4551 pc.
defineInt(
"numee",
"PrintEvalErrors",0,10) ;
4573 #ifdef __ROOFIT_NOROOMINIMIZER 4574 const char* minType =0 ;
4576 const char* minType = pc.
getString(
"mintype",
"Minuit") ;
4577 const char* minAlg = pc.
getString(
"minalg",
"minuit") ;
4594 #ifdef __ROOFIT_NOROOMINIMIZER 4597 if (
"OldMinuit" ==
string(minType)) {
4619 ret = m.
fit(fitOpt) ;
4653 m.
minos(*minosSet) ;
4662 string title =
Form(
"Result of fit of %s ",
GetName()) ;
4663 ret = m.
save(name.c_str(),title.c_str()) ;
4668 #ifndef __ROOFIT_NOROOMINIMIZER 4690 ret = m.
fit(fitOpt) ;
4724 m.
minos(*minosSet) ;
4733 string title =
Form(
"Result of fit of %s ",
GetName()) ;
4734 ret = m.
save(name.c_str(),title.c_str()) ;
4776 while((arg=iter.
next())) {
4779 <<
") function does not depend on listed parameter " << arg->
GetName() <<
", ignoring" << endl ;
4782 if (plist.size()>0) plist +=
":" ;
virtual Double_t getMin(const char *name=0) const
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 RooNumIntConfig & defaultConfig()
Return reference to instance of default numeric integrator configuration object.
virtual const char * GetName() const
Returns name of object.
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
virtual RooAbsArg * cloneTree(const char *newname=0) const
Clone tree expression of objects.
void setInterpolationOrder(Int_t order)
Set interpolation order of RooHistFunct representing cache histogram.
TIterator * createIterator(Bool_t dir=kIterForward) const
Bool_t postRangeFracScale
const char * getString(Int_t idx) const
static long int sum(long int i)
static void globalSelectComp(Bool_t flag)
Global switch controlling the activation of the selectComp() functionality.
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, which is interpreted as an OR of 'enum ContentsOptions' values and in the style given by 'enum StyleOption'.
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
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...
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.
TObject * FindObject(const char *name) const
Return pointer to obejct with given name.
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
void setServerValues(const char *tmp)
void setPrintEvalErrors(Int_t numEvalErrors)
A RooCurve is a one-dimensional graphical representation of a real-valued function.
static EvalErrorIter evalErrorIter()
Bool_t _boolValue
Transient cache for integer values from tree branches.
const RooArgList & floatParsFinal() const
RooNumIntConfig holds the configuration parameters of the various numeric integrators used by RooReal...
virtual Double_t getMax(const char *name=0) const
virtual Bool_t add(const RooAbsCollection &col, Bool_t silent=kFALSE)
Add a collection of arguments to this collection by calling add() for each element in the source coll...
virtual const RooArgSet * get() const
void setVerbose(Bool_t flag=kTRUE)
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...
void optimizeConst(Int_t flag)
If flag is true, perform constant term optimization on function being minimized.
virtual TObject * clone(const char *newname) const
const char * addToCurveName
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.
virtual void SetParName(Int_t ipar, const char *name)
Set name of parameter number ipar.
void sort(Bool_t ascend=kTRUE)
const Text_t * getUnit() const
void plotOnCompSelect(RooArgSet *selNodes) const
Helper function for plotting of composite p.d.fs.
static RooNumIntConfig * defaultIntegratorConfig()
Returns the default numeric integration configuration for all RooAbsReals.
Class RooProfileLL implements the profile likelihood estimator for a given likelihood and set of para...
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...
RooArgSet * getObservables(const RooArgSet &set, Bool_t valueOnly=kTRUE) const
Collectable string class.
virtual const RooArgSet * get() const
void setPlotLabel(const char *label)
Set the label associated with this variable.
RooCmdArg ZVar(const RooAbsRealLValue &var, const RooCmdArg &arg=RooCmdArg::none())
Int_t GetCompressionLevel() const
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 Double_t evaluate() const =0
RooAbsCollection * selectCommon(const RooAbsCollection &refColl) const
Create a subset of the current collection, consisting only of those elements that are contained as we...
virtual Bool_t isValidReal(Double_t value, Bool_t printError=kFALSE) const
Interface function to check if given value is a valid value for this object.
Bool_t matchArgs(const RooArgSet &allDeps, RooArgSet &numDeps, const RooArgProxy &a) const
Utility function for use in getAnalyticalIntegral().
virtual TObject * Clone(const char *newName=0) const
Make a clone of an object using the Streamer facility.
Int_t hesse()
Execute HESSE.
const char * getString(const char *name, const char *defaultValue="", Bool_t convEmptyToNull=kFALSE)
Return string property registered with name 'name'.
virtual Bool_t isParameterized() const
virtual Bool_t replace(const RooAbsArg &var1, const RooAbsArg &var2)
Replace var1 with var2 and return kTRUE for success.
Double_t getVal(const RooArgSet *set=0) const
Bool_t matchArgsByName(const RooArgSet &allArgs, RooArgSet &matchedArgs, const TList &nameList) const
Check if allArgs contains matching elements for each name in nameList.
void setString(Int_t idx, const char *value)
const TMatrixDSym & covarianceMatrix() const
Return covariance matrix.
virtual Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=0) const
Interface function getAnalyticalIntergral advertises the analytical integrals that are supported...
Lightweight interface adaptor that exports a RooAbsReal as a ROOT::Math::IMultiGenFunction.
RooFirstMoment represents the first, second, or third order derivative of any RooAbsReal as calculate...
virtual const char * GetTypeName() const
RooAbsMoment * moment(RooRealVar &obs, Int_t order, Bool_t central, Bool_t takeRoot)
Return function representing moment of function of given order.
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...
Class RooNumRunningInt is an implementation of RooAbsCachedReal that represents a running integral t...
void setBuffer(RooAbsReal *real, Double_t *newBuf)
RooAbsArg * createFundamental(const char *newname=0) const
Create a RooRealVar fundamental object with our properties.
void set(Double_t weight, Double_t wgtErr=-1)
Increment the weight of the bin enclosing the coordinates given by 'row' by the specified amount...
void addPlotable(RooPlotable *plotable, Option_t *drawOptions="", Bool_t invisible=kFALSE, Bool_t refreshNorm=kFALSE)
Add the specified plotable object to our plot.
virtual std::list< Double_t > * binBoundaries(RooAbsRealLValue &, Double_t, Double_t) const
Double_t traceEval(const RooArgSet *set) const
Calculate current value of object, with error tracing wrapper.
void SetCompressionLevel(Int_t level=1)
Set compression level.
static std::map< const RooAbsArg *, std::pair< std::string, std::list< EvalError > > > _evalErrorList
Int_t minos()
Execute MINOS.
virtual Int_t GetNbinsZ() const
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 ...
TString getTitle(Bool_t appendUnit=kFALSE) const
Return this variable's title string.
virtual void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Structure printing.
friend class RooRealIntegral
static void clearEvalErrorLog()
Clear the stack of evaluation error messages.
virtual RooAbsReal * createChi2(RooDataHist &data, const RooLinkedList &cmdList)
Internal back-end function to create a chi2.
void setNameList(const char *givenList)
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...
static constexpr double ps
static Int_t numEvalErrorItems()
RooFIter fwdIterator() const
void constOptimizeTestStatistic(ConstOpCode opcode, Bool_t doAlsoTrackingOpt=kTRUE)
Driver function to propagate constant term optimizations in test statistic.
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.
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 TObject * Clone(const char *newname=0) const
Make a clone of an object using the Streamer facility.
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
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...
void allowUndefined(Bool_t flag=kTRUE)
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 Int_t getIndex() const
Return index number of current state.
Bool_t isValueDirtyAndClear() const
Bool_t addOwnedComponents(const RooArgSet &comps)
Take ownership of the contents of 'comps'.
Int_t migrad()
Execute MIGRAD.
void setStrategy(Int_t strat)
Change MINUIT strategy to istrat.
TObject * At(Int_t idx) const
RooAbsMoment represents the first, second, or third order derivative of any RooAbsReal as calculated ...
TObject * getObject(const char *name, TObject *obj=0)
Return TObject property registered with name 'name'.
RooCmdArg SupNormSet(const RooArgSet &nset)
static void setHideOffset(Bool_t flag)
void attachDataSet(const RooAbsData &set)
Replace server nodes with names matching the dataset variable names with those data set variables...
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 RooPlot * plotAsymOn(RooPlot *frame, const RooAbsCategoryLValue &asymCat, PlotOpt o) const
Iterator abstract base class.
virtual ~RooAbsReal()
Destructor.
void setMinimizerType(const char *type)
Choose the minimzer algorithm.
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 * createRunningIntegral(const RooArgSet &iset, const RooArgSet &nset=RooArgSet())
Create a running integral over this function, i.e.
void setStrategy(Int_t strat)
Change MINUIT strategy to istrat.
virtual Bool_t setLabel(const char *label, Bool_t printError=kTRUE)
Set value by specifying the name of the desired state If printError is set, a message will be printed...
virtual Bool_t isValid() const
Check if current value is valid.
const char * curveNameSuffix
void setValueDirty() const
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.
Bool_t process(const RooCmdArg &arg)
Process given RooCmdArg.
static const RooCmdArg & none()
Return reference to null argument.
void setStringAttribute(const Text_t *key, const Text_t *value)
Associate string 'value' to this object under key 'key'.
RooAbsReal * createIntRI(const RooArgSet &iset, const RooArgSet &nset=RooArgSet())
Utility function for createRunningIntegral that construct an object implementing the standard (analyt...
const char * normRange() const
virtual Int_t GetDimension() const
friend class RooRealBinding
void setVerbose(Bool_t flag=kTRUE)
virtual void SetMinimum(Double_t minimum=-1111)
Set minimum value of Y axis.
void setBinning(const RooAbsBinning &binning, const char *name=0)
Add given binning under name 'name' with this variable.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
static void setEvalErrorLoggingMode(ErrorLoggingMode m)
Set evaluation error logging mode.
const char * normRangeName
RooDataSet is a container class to hold N-dimensional binned data.
RooRealIntegral performs hybrid numerical/analytical integrals of RooAbsReal objects The class perfor...
virtual Bool_t readFromStream(std::istream &is, Bool_t compact, Bool_t verbose=kFALSE)
Read object contents from stream (dummy for now)
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...
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 Double_t getValV(const RooArgSet *set=0) const
Return value of object.
virtual TObject * Clone(const char *newname=0) const
Make a clone of an object using the Streamer facility.
virtual void SetName(const char *name="")
Set graph name.
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
virtual void removeAll()
Remove all arguments from our set, deleting them if we own them.
Int_t _intValue
Transient cache for floating point values from tree branches.
void removeRange(const char *name=0)
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 wi...
RooVectorDataStore is the abstract base class for data collection that use a TTree as internal storag...
Int_t setPrintLevel(Int_t newLevel)
Change the MINUIT internal printing level.
std::map< const RooAbsArg *, std::pair< std::string, std::list< EvalError > > >::const_iterator EvalErrorIter
Double_t binVolume() const
virtual Double_t GetBinCenter(Int_t bin) const
Return center of bin.
void setOwning(Bool_t flag)
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...
Class RooBinning is an implements RooAbsBinning in terms of an array of boundary values, posing no constraints on the choice of binning, thus allowing variable bin sizes.
void setIntegratorConfig()
Remove the specialized numeric integration configuration associated with this object.
virtual RooAbsReal * highBoundFunc() const
virtual Bool_t isIdentical(const RooAbsArg &other, Bool_t assumeSameType=kFALSE)
void setParameterizeIntegral(const RooArgSet ¶mVars)
Double_t GetMinimum(Double_t minval=-FLT_MAX) const
const RooArgSet * getNormVars() const
virtual RooAbsReal * lowBoundFunc() const
void setBins(Int_t nBins, const char *name=0)
RooAbsCategoryLValue is the common abstract base class for objects that represent a discrete value th...
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 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...
const char * projectionRangeName
Double_t Erfc(Double_t x)
Compute the complementary error function erfc(x).
static constexpr double second
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 TIterator * MakeIterator(Bool_t dir=kIterForward) const
Return a list iterator.
void stripCmdList(RooLinkedList &cmdList, const char *cmdsToPurge)
Utility function that strips command names listed (comma separated) in cmdsToPurge from cmdList...
RooNumIntConfig * specialIntegratorConfig() const
Returns the specialized integrator configuration for this RooAbsReal.
RooRealVar represents a fundamental (non-derived) real valued object.
Bool_t overlaps(const RooAbsCollection &otherColl) const
Check if this and other collection have common entries.
virtual void addClone(const RooAbsCollection &col, Bool_t silent=kFALSE)
Add a collection of arguments to this collection by calling addOwned() for each element in the source...
virtual Bool_t isFundamental() const
const RooArgSet & numIntRealVars() const
virtual Double_t offset() const
static Int_t _evalErrorCount
virtual void setVal(Double_t value)
Set value of variable to 'value'.
Bool_t isSignType(Bool_t mustHaveZero=kFALSE) const
Determine if category has 2 or 3 states with index values -1,0,1.
Bool_t getAttribute(const Text_t *name) const
Check if a named attribute is set. By default, all attributes are unset.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual void Add(TObject *arg)
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.
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.
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...
RooNameSet is a utility class that stores the names the objects in a RooArget.
const TString & GetString() 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 ...
virtual Double_t maxVal(Int_t code) const
Return maximum value for set of observables identified by code assigned in getMaxVal.
TString cleanBranchName() const
Construct a mangled name from the actual name that is free of any math symbols that might be interpre...
void defineMutex(const char *argName1, const char *argName2)
Define arguments named argName1 and argName2 mutually exclusive.
Int_t getInt(const char *name, Int_t defaultValue=0)
Return integer property registered with name 'name'.
RooNumIntConfig * _specIntegratorConfig
std::string contentsString() const
Return comma separated list of contained object names as STL string.
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
OBSOLETE – RETAINED FOR BACKWARD COMPATIBILITY. Use the plotOn(frame,Slice(...)) instead...
RooFit::MPSplit interleave
Class to manage histogram axis.
const char * getPlotLabel() const
Get the label associated with the variable.
static Int_t numEvalErrors()
Return the number of logged evaluation errors since the last clearing.
RooAbsArg * at(Int_t idx) const
friend class RooCustomizer
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
RooAbsArg * first() const
const RooAbsReal * createPlotProjection(const RooArgSet &depVars, const RooArgSet &projVars) const
Utility function for plotOn() that creates a projection of a function or p.d.f to be plotted on a Roo...
void logEvalError(const char *message, const char *serverValueString=0) const
Log evaluation error message.
RooFitResult * save(const char *name=0, const char *title=0)
Save and return a RooFitResult snaphot of current minimizer status.
virtual void SetMaximum(Double_t maximum=-1111)
Set maximum value of Y axis.
A 3-Dim function with parameters.
RooAbsProxy is the abstact interface for proxy classes.
void setProfile(Bool_t flag=kTRUE)
Bool_t ok(Bool_t verbose) const
Return true of parsing was successful.
Lightweight interface adaptor that exports a RooAbsReal as a ROOT::Math::IGenFunction.
RooArgSet * getComponents() const
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 Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
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...
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 ...
RooPlot * plotOnWithErrorBand(RooPlot *frame, const RooFitResult &fr, Double_t Z, const RooArgSet *params, const RooLinkedList &argList, Bool_t method1) const
Plot function or p.d.f.
RooAbsReal * createIntObj(const RooArgSet &iset, const RooArgSet *nset, const RooNumIntConfig *cfg, const char *rangeName) const
Utility function for createIntegral that creates the actual integreal object.
virtual void preferredObservableScanOrder(const RooArgSet &obs, RooArgSet &orderedObs) const
Interface method for function objects to indicate their prefferred order of observables for scanning ...
void SetName(const char *name)
Set the name of the TNamed.
const Text_t * getStringAttribute(const Text_t *key) const
Get string attribute mapped under key 'key'.
Implement the abstract 1-dimensional root finding interface using the Brent-Decker method...
char * Form(const char *fmt,...)
RooCachedReal is an implementation of RooAbsCachedReal that can cache any external RooAbsReal input f...
RooAbsArg * absArg() const
virtual Bool_t addOwned(const RooAbsCollection &col, Bool_t silent=kFALSE)
Add a collection of arguments to this collection by calling addOwned() for each element in the source...
virtual const RooAbsBinning & getBinning(const char *name=0, Bool_t verbose=kTRUE, Bool_t createOnTheFly=kFALSE) const =0
static void printEvalErrors(std::ostream &os=std::cout, Int_t maxPerNode=10000000)
Print all outstanding logged evaluation error on the given ostream.
OperMode operMode() const
const RooArgSet * projSet
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...
virtual void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Implement multi-line detailed printing.
Class RooCmdConfig is a configurable parser for RooCmdArg named arguments.
RooAbsData is the common abstract base class for binned and unbinned datasets.
void setPrintEvalErrors(Int_t numEvalErrors)
const RooAbsData * projData
A 2-Dim function with parameters.
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.
Class RooParamBinning is an implementation of RooAbsBinning that constructs a binning with a range de...
RooDataSet is a container class to hold unbinned data.
virtual void attachToTree(TTree &t, Int_t bufSize=32000)
Attach object to a branch of given TTree.
void setMessage(const char *tmp)
RooCategory represents a fundamental (non-derived) discrete value object.
UChar_t _byteValue
Transient cache for bool values from tree branches.
static Bool_t hideOffset()
virtual const RooArgSet * get(Int_t index) const
Return RooArgSet with coordinates of event 'index'.
A RooPlot is a plot frame and a container for graphics objects within that frame. ...
RooSecondMoment represents the first, second, or third order derivative of any RooAbsReal as calculat...
virtual ExtendMode extendMode() const
void replaceArg(const RooAbsArg &orig, const RooAbsArg &subst)
Replace any occurence of arg 'orig' with arg 'subst'.
RooLinkedList is an collection class for internal use, storing a collection of RooAbsArg pointers in ...
RooArgSet * getSet(const char *name, RooArgSet *set=0)
Return RooArgSet property registered with name 'name'.
RooAbsBinning is the abstract base class for RooRealVar binning definitions This class defines the in...
void Delete(Option_t *o=0)
Remove all elements in collection and delete all elements NB: Collection does not own elements...
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...
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...
RooAbsArg * find(const char *name) const
Find object with given name in list.
virtual Int_t numEntries() const
Return the number of bins.
Bool_t operator==(Double_t value) const
Equality operator comparing to a Double_t.
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
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)...
RooAbsReal()
coverity[UNINIT_CTOR] Default constructor
RooFIter fwdIterator() const
RooFitResult * save(const char *name=0, const char *title=0)
Save and return a RooFitResult snaphot of current minimizer status.
virtual void attachToVStore(RooVectorDataStore &vstore)
Int_t minos()
Execute MINOS.
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...
Double_t getDouble(const char *name, Double_t defaultValue=0)
Return Double_t property registered with name 'name'.
RooMoment represents the first, second, or third order derivative of any RooAbsReal as calculated (nu...
RealVector * addReal(RooAbsReal *real)
RooCmdArg YVar(const RooAbsRealLValue &var, const RooCmdArg &arg=RooCmdArg::none())
static RooMathCoreReg dummy
virtual Bool_t checkObservables(const RooArgSet *nset) const
Overloadable function in which derived classes can implement consistency checks of the variables...
static ErrorLoggingMode evalErrorLoggingMode()
Return current evaluation error logging mode.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
RooCmdArg NormRange(const char *rangeNameList)
TObject * getObject(Int_t idx) const
Return the name of the object at slot 'idx' in this RooPlot.
TObjArray * GetListOfLeaves()
RooArgSet * select(const RooArgSet &list) const
Construct a RooArgSet of objects in input 'list' whose names match to those in the internal name list...
Int_t minimize(const char *type, const char *alg=0)
Double_t GetMaximum(Double_t maxval=FLT_MAX) const
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
const RooLinkedList & getObjectList(const char *name)
Return list of objects registered with name 'name'.
Double_t getPropagatedError(const RooFitResult &fr, const RooArgSet &nset=RooArgSet())
Calculate error on self by propagated errors on parameters with correlations as given by fit result T...
static Bool_t _cacheCheck
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...
static Bool_t _globalSelectComp
Component selection flag for RooAbsPdf::plotCompOn.
RooAbsProxy * getProxy(Int_t index) const
Return the nth proxy from the proxy list.
Bool_t dependsOnValue(const RooAbsCollection &serverList, const RooAbsArg *ignoreArg=0) const
void setCloneBranchSet(RooArgSet &cloneBranchSet)
Install the input RooArgSet as container in which all cloned branches will be stored.
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...
void setRange(const char *name, Double_t min, Double_t max)
Set range named 'name to [min,max].
Mother of all ROOT objects.
Int_t setPrintLevel(Int_t newLevel)
Change the MINUIT internal printing level.
you should not use this method at all Int_t Int_t z
Int_t numProxies() const
Return the number of registered proxies.
virtual Bool_t remove(const RooAbsArg &var, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE)
Remove the specified argument from our list.
RooArgProxy is the abstact interface for RooAbsArg proxy classes.
Int_t hesse()
Execute HESSE.
static Bool_t _hideOffset
RooDerivative represents the first, second, or third order derivative of any RooAbsReal as calculated...
Bool_t hasProcessed(const char *cmdName) const
Return true if RooCmdArg with name 'cmdName' has been processed.
Class RooDataWeightedAverage calculate a weighted average of a function or p.d.f given a dataset with...
RooFitResult * fit(const char *options)
Parse traditional RooAbsPdf::fitTo driver options.
void setProfile(Bool_t flag=kTRUE)
RooAbsRealLValue is the common abstract base class for objects that represent a real value that may a...
RooAbsPdf is the abstract interface for all probability density functions The class provides hybrid a...
virtual Double_t analyticalIntegral(Int_t code, const char *rangeName=0) const
Implements the actual analytical integral(s) advertised by getAnalyticalIntegral. ...
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...
RooFitResult * chi2FitDriver(RooAbsReal &fcn, RooLinkedList &cmdList)
Internal driver function for chi2 fits.
virtual void Add(TObject *obj)
void setShapeDirty() const
RooAbsRealLValue * getPlotVar() const
TIterator * MakeIterator(Bool_t dir=kTRUE) const
Return an iterator over this list.
const RooNumIntConfig * getIntegratorConfig() const
Return the numeric integration configuration used for this object.
RooMinimizer is a wrapper class around ROOT::Fit:Fitter that provides a seamless interface between th...
virtual RooAbsReal * createProfile(const RooArgSet ¶msOfInterest)
Create a RooProfileLL object that eliminates all nuisance parameters in the present function...
virtual TObject * Next()=0
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...
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
virtual void setTreeBranchStatus(TTree &t, Bool_t active)
(De)Activate associated tree branch
static void setCacheCheck(Bool_t flag)
Activate cache validation mode.
Int_t GetEntries() const
Return the number of objects in array (i.e.
static constexpr double pc
Bool_t isSelectedComp() const
If true, the current pdf is a selected component (for use in plotting)
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 ...
Lightweight interface adaptor that exports a RooAbsPdf as a functor.
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 ...
void setNoWarn()
Instruct MINUIT to suppress warnings.
UInt_t _uintValue
Transient cache for signed byte values from tree branches.
virtual void SetParameter(Int_t param, Double_t value)
Abstract base class for objects that are lvalues, i.e.
RooAddition calculates the sum of a set of RooAbsReal terms, or when constructed with two sets...
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 Int_t GetNbinsX() const
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...
Lightweight interface adaptor that binds a RooAbsReal object to a subset of its servers and present i...
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
virtual const char * GetName() const
Returns name of object.
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
A TTree is a list of TBranches.
Bool_t recursiveRedirectServers(const RooAbsCollection &newServerList, Bool_t mustReplaceAll=kFALSE, Bool_t nameChange=kFALSE, Bool_t recurseInNewSet=kTRUE)
virtual void fillTreeBranch(TTree &t)
Fill the tree branch that associated with this object with its current value.
RooGenFunction * iGenFunction(RooRealVar &x, const RooArgSet &nset=RooArgSet())
Double_t getError() const
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
virtual Int_t getMaxVal(const RooArgSet &vars) const
Advertise capability to determine maximum value of function for given set of observables.
Char_t _sbyteValue
Transient cache for byte values from tree branches.
static ErrorLoggingMode _evalErrorMode
RooFitResult * fit(const char *options)
Parse traditional RooAbsPdf::fitTo driver options.
RooLinkedList filterCmdList(RooLinkedList &cmdInList, const char *cmdNameList, Bool_t removeFromInList=kTRUE)
Utility function to filter commands listed in cmdNameList from cmdInList.
Lightweight RooAbsFunction implementation that applies a constant scale factor to another RooAbsFunc...
Abstract interface for evaluating a real-valued function of one real variable and performing numerica...
Bool_t plotSanityChecks(RooPlot *frame) const
Utility function for plotOn(), perform general sanity check on frame to ensure safe plotting operatio...
virtual void print(std::ostream &os, Bool_t addContents=kFALSE) const
Print proxy name.
virtual void printValue(std::ostream &os) const
Print object value.
const RooArgSet * projDataSet
void remove(const char *name=0, Bool_t deleteToo=kTRUE)
Remove object with given name, or last object added if no name is given.
TAxis * GetXaxis()
Get the behaviour adopted by the object about the statoverflows. See EStatOverflows for more informat...
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...
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 chi^2 fit to given histogram By default the fit is executed through the MINUIT commands MIG...
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.
virtual Int_t numEntries() const
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...
virtual Int_t GetNbinsY() const
virtual const char * GetTitle() const
Returns title of object.
RooCmdArg Binning(const RooAbsBinning &binning)
virtual void writeToStream(std::ostream &os, Bool_t compact) const
Write object contents to stream (dummy for now)
RooMinuit is a wrapper class around TFitter/TMinuit that provides a seamless interface between the MI...
RooCmdArg is a named container for two doubles, two integers two object points and three string point...
void optimizeConst(Int_t flag)
If flag is true, perform constant term optimization on function being minimized.
virtual Bool_t setIndex(Int_t index, Bool_t printError=kTRUE)=0
virtual Double_t analyticalIntegralWN(Int_t code, const RooArgSet *normSet, const char *rangeName=0) const
Implements the actual analytical integral(s) advertised by getAnalyticalIntegral. ...