35 #include <sys/types.h>
76 #ifndef __ROOFIT_NOROOMINIMIZER
109 using namespace std ;
140 RooAbsArg(name,title), _plotMin(0), _plotMax(0), _plotBins(100),
141 _value(0), _unit(unit), _forceNumInt(
kFALSE), _specIntegratorConfig(0), _treeVar(
kFALSE), _selectComp(
kTRUE), _lastNSet(0)
154 Double_t inMaxVal,
const char *unit) :
155 RooAbsArg(name,title), _plotMin(inMinVal), _plotMax(inMaxVal), _plotBins(100),
156 _value(0), _unit(unit), _forceNumInt(
kFALSE), _specIntegratorConfig(0), _treeVar(
kFALSE), _selectComp(
kTRUE), _lastNSet(0)
170 RooAbsArg(other,name), _plotMin(other._plotMin), _plotMax(other._plotMax),
171 _plotBins(other._plotBins), _value(other._value), _unit(other._unit), _label(other._label),
172 _forceNumInt(other._forceNumInt), _treeVar(other._treeVar), _selectComp(other._selectComp), _lastNSet(0)
198 return (
getVal()==value) ;
218 if (!assumeSameType) {
234 if(appendUnit && 0 != strlen(
getUnit())) {
301 <<
"): validation failed: " << value << endl ;
321 const RooArgSet* ,
const char* rangeName)
const
352 if (code==0)
return getVal(normSet) ;
366 coutF(
Eval) <<
"RooAbsReal::analyticalIntegral(" <<
GetName() <<
") code " << code <<
" not implemented" << endl ;
427 os << indent <<
"--- RooAbsReal ---" << endl;
431 os << endl << indent <<
" Plot label is \"" <<
getPlotLabel() <<
"\"" << endl;
516 pc.
process(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) ;
547 if (!rangeName || strchr(rangeName,
',')==0) {
561 components.
add(*compIntegral) ;
566 title.
Prepend(
"Integral of ") ;
595 title.
Prepend(
"Integral of ") ;
620 title.Prepend(
"Integral of ") ;
629 if (integrand !=
this) {
637 if (integrand ==
this && iset.
getSize()>0) {
638 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 ;
642 integrand = integral ;
650 coutE(
Integration) <<
GetName() <<
" : ERROR while defining recursive integral over observables with parameterized integration ranges, please check that integration rangs specify uniquely defined integral " << endl;
659 if (cacheParamsStr && strlen(cacheParamsStr)) {
667 if (cacheParams->
getSize()>0) {
669 <<
"-dim value cache for integral over " << iset2 <<
" as a function of " << *cacheParams <<
" in range " << (rangeName?rangeName:
"<none>") << endl ;
673 cachedIntegral->addOwnedComponents(*integral) ;
674 cachedIntegral->setCacheSource(
kTRUE) ;
676 cachedIntegral->setOperMode(
ADirty) ;
679 integral = cachedIntegral ;
725 obsWithParamRange.
add(*aarg) ;
726 obsWithFixedRange.
remove(*aarg) ;
727 obsServingAsRangeParams.
add(*loBoundObs,
kFALSE) ;
728 obsServingAsRangeParams.
add(*hiBoundObs,
kFALSE) ;
738 RooArgSet obsWithFixedRangeNP(obsWithFixedRange) ;
739 obsWithFixedRangeNP.
remove(obsServingAsRangeParams) ;
742 RooArgSet obsWithParamRangeNP(obsWithParamRange) ;
743 obsWithParamRangeNP.
remove(obsServingAsRangeParams) ;
747 innerObs.
add(obsWithFixedRangeNP) ;
748 innerObs.
add(obsWithParamRangeNP) ;
783 }
else if (!omitEmpty) {
787 if (nset && nset->
getSize()>0 ) {
874 assert(0 != dependentIterator);
879 <<
"\" of wrong type: " << arg->
ClassName() << endl;
880 delete dependentIterator;
887 <<
"\" is not a dependent and will be ignored." << endl;
892 leafNodes.
replace(*found,*arg);
894 leafNodes.
add(*arg) ;
904 leafNodes.
add(*lvs) ;
913 if(0 != projectedVars && projectedVars->
find(arg->
GetName())) {
915 <<
"\" cannot be both a dependent and a projected variable." << endl;
916 delete dependentIterator;
922 if(0 != projectedVars) leafNodes.
remove(*projectedVars,
kTRUE);
927 coutE(
Plotting) <<
"RooAbsPdf::createPlotProjection(" <<
GetName() <<
") Couldn't deep-clone PDF, abort," << endl ;
940 delete plotLeafNodes ;
944 if(0 != projectedVars) normSet.
add(*projectedVars);
953 if(0 == projectedVars) projectedVars= ∅
959 title.
Prepend(
"Projection of ");
964 if(0 == projected || !projected->
isValid()) {
968 if(0 != projected)
delete projected;
969 delete dependentIterator;
980 delete dependentIterator;
1016 if(hdim != plotVars.
getSize()) {
1025 for(
Int_t index= 0; index < plotVars.
getSize(); index++) {
1030 <<
"\" of type " << var->
ClassName() << endl;
1035 <<
":fillHistogram: WARNING: variable is not an explicit dependent: " << realVar->
GetName() << endl;
1051 if (projectedVars) {
1052 allDeps.
add(*projectedVars) ;
1066 Int_t xbins(0),ybins(1),zbins(1);
1078 assert(0 != zvar && 0 != zaxis);
1079 if (scaleForDensity) {
1087 assert(0 != yvar && 0 != yaxis);
1088 if (scaleForDensity) {
1096 assert(0 != xvar && 0 != xaxis);
1097 if (scaleForDensity) {
1103 << hdim <<
" dimensions" << endl;
1110 Int_t xbin(0),ybin(0),zbin(0);
1115 if(bin % (xbins*ybins) == 0) {
1121 if(bin % xbins == 0) {
1122 ybin= (ybin%ybins) + 1;
1127 xbin= (xbin%xbins) + 1;
1137 coutW(
Plotting) <<
"WARNING: Function evaluation error(s) at coordinates [x]=" << xvar->
getVal() ;
1210 if (showProgress && (i%onePct==0)) {
1214 Double_t binVal = theClone->
getVal(normSet?normSet:obs)*scaleFactor ;
1215 if (correctForBinSize) {
1242 strlcpy(buf,varNameList,1024) ;
1243 char* varName = strtok(buf,
",:") ;
1248 varName = strtok(0,
",") ;
1250 varName = strtok(0,
",") ;
1339 pc.
defineInt(
"intBinning",
"IntrinsicBinning",0,2) ;
1340 pc.
defineInt(
"extended",
"Extended",0,2) ;
1344 pc.
defineSet(
"projObs",
"ProjectedObservables",0,0) ;
1347 pc.
defineMutex(
"SelectCompSet",
"SelectCompSpec") ;
1349 pc.
defineMutex(
"IntrinsicBinning",
"BinningName") ;
1350 pc.
defineMutex(
"IntrinsicBinning",
"BinningSpec") ;
1378 if (!pdfSelf && doExtended>0) {
1379 coutW(
InputArguments) <<
"RooAbsReal::createHistogram(" <<
GetName() <<
") WARNING extended mode requested for a non-pdf object, ignored" << endl ;
1383 coutW(
InputArguments) <<
"RooAbsReal::createHistogram(" <<
GetName() <<
") WARNING extended mode requested for a non-extendable pdf, ignored" << endl ;
1386 if (pdfSelf && doExtended==2) {
1390 const char* compSpec = pc.
getString(
"compSpec") ;
1392 Bool_t haveCompSel = ( (compSpec && strlen(compSpec)>0) || compSet) ;
1395 if (doIntBinning>0) {
1400 if (doIntBinning==1) {
1402 <<
") WARNING, intrinsic model binning requested for histogram, but model does not define bin boundaries, reverting to default binning"<< endl ;
1405 if (doIntBinning==2) {
1407 <<
") INFO: Model has intrinsic binning definition, selecting that binning for the histogram"<< endl ;
1410 for (list<double>::iterator it=bl->begin() ; it!=bl->end() ; ++it) { ba[i++] = *it ; }
1411 intBinning =
new RooBinning(bl->size()-1,ba) ;
1417 pc.
stripCmdList(argListCreate,
"Scaling,ProjectedObservables,IntrinsicBinning,SelectCompSet,SelectCompSpec,Extended") ;
1422 argListCreate.
Add(&tmp) ;
1440 if (!dynamic_cast<RooAbsReal*>(arg)) {
1441 branchNodeSet.
remove(*arg) ;
1452 if (dirSelNodes->
getSize()>0) {
1453 coutI(
Plotting) <<
"RooAbsPdf::createHistogram(" <<
GetName() <<
") directly selected PDF components: " << *dirSelNodes << endl ;
1459 coutE(
Plotting) <<
"RooAbsPdf::createHistogram(" <<
GetName() <<
") ERROR: component selection set " << *compSet <<
" does not match any components of p.d.f." << endl ;
1461 coutE(
Plotting) <<
"RooAbsPdf::createHistogram(" <<
GetName() <<
") ERROR: component selection expression '" << compSpec <<
"' does not select any components of p.d.f." << endl ;
1465 delete dirSelNodes ;
1503 if (!dynamic_cast<RooAbsReal*>(arg)) {
1504 branchNodeSet.
remove(*arg) ;
1545 selNodes->
add(tmp) ;
1546 coutI(
Plotting) <<
"RooAbsPdf::plotOn(" <<
GetName() <<
") indirectly selected PDF components: " << tmp << endl ;
1709 argList.
Add(&rnorm) ;
1711 list<string> rlist ;
1716 char* oneRange = strtok(buf,
",") ;
1718 rlist.push_back(oneRange) ;
1719 oneRange = strtok(0,
",") ;
1722 for (list<string>::iterator riter=rlist.begin() ; riter!=rlist.end() ; ++riter) {
1735 pc.
defineString(
"curveNameSuffix",
"CurveNameSuffix",0,
"") ;
1744 pc.
defineInt(
"doEvalError",
"EvalErrorValue",0,0) ;
1745 pc.
defineInt(
"shiftToZero",
"ShiftToZero",0,0) ;
1750 pc.
defineSet(
"errorPars",
"VisualizeError",0) ;
1751 pc.
defineInt(
"linearMethod",
"VisualizeError",0,0) ;
1752 pc.
defineInt(
"binProjData",
"ProjData",0,0) ;
1755 pc.
defineInt(
"numee",
"PrintEvalErrors",0,10) ;
1756 pc.
defineInt(
"rangeAdjustNorm",
"Range",0,0) ;
1757 pc.
defineInt(
"rangeWNAdjustNorm",
"RangeWithName",0,0) ;
1761 pc.
defineInt(
"lineColor",
"LineColor",0,-999) ;
1762 pc.
defineInt(
"lineStyle",
"LineStyle",0,-999) ;
1763 pc.
defineInt(
"lineWidth",
"LineWidth",0,-999) ;
1764 pc.
defineInt(
"fillColor",
"FillColor",0,-999) ;
1765 pc.
defineInt(
"fillStyle",
"FillStyle",0,-999) ;
1767 pc.
defineInt(
"curveInvisible",
"Invisible",0,0) ;
1768 pc.
defineInt(
"showProg",
"ShowProgress",0,0) ;
1770 pc.
defineInt(
"interleave",
"NumCPU",1,0) ;
1774 pc.
defineInt(
"moveToBack",
"MoveToBack",0,0) ;
1778 pc.
defineMutex(
"VisualizeError",
"VisualizeErrorData") ;
1816 const char* sliceCatState = pc.
getString(
"sliceCatState",0,
kTRUE) ;
1818 if (sliceCatState) {
1827 strlcpy(buf,sliceCatState,1024) ;
1828 const char* slabel = strtok(buf,
",") ;
1840 slabel = strtok(0,
",") ;
1852 if (vlines==2) vlines=0 ;
1858 if (vlines==2) vlines=0 ;
1884 cxcoutD(
Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") Preprocessing: have slice " << *sliceSet << endl ;
1891 while((sliceArg=(
RooAbsArg*)iter->Next())) {
1894 projectedVars.
remove(*arg) ;
1897 << sliceArg->
GetName() <<
" was not projected anyway" << endl ;
1901 }
else if (projSet) {
1902 cxcoutD(
Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") Preprocessing: have projSet " << *projSet << endl ;
1905 cxcoutD(
Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") Preprocessing: have neither sliceSet nor projSet " << endl ;
1910 cxcoutD(
Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") Preprocessing: projectedVars = " << projectedVars << endl ;
1976 projDataVars.
add(*tmp) ;
1999 cxcoutD(
Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") frame->getNormVars() that are also observables = " << *sliceSetTmp << endl ;
2012 << frame->
getPlotVar()->
GetName() <<
" represents a slice in " << *sliceSetTmp << endl ;
2014 sliceSet.
add(*sliceSetTmp) ;
2015 delete sliceSetTmp ;
2021 cxcoutD(
Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") projectedVars = " << projectedVars <<
" sliceSet = " << sliceSet << endl ;
2034 if (!plotCloneSet) {
2035 coutE(
Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") Couldn't deep-clone self, abort," << endl ;
2041 if (projectedVars.
getSize()) {
2043 <<
" integrates over variables " << projectedVars
2046 if (projDataNeededVars && projDataNeededVars->
getSize()>0) {
2048 <<
" averages using data variables " << *projDataNeededVars << endl ;
2056 if (projDataNeededVars) {
2060 deps->
add(*plotVar) ;
2066 coutE(
Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") error in checkObservables, abort" << endl ;
2068 delete plotCloneSet ;
2069 if (projDataNeededVars)
delete projDataNeededVars ;
2084 fullNormSet.
add(projectedVars) ;
2085 if (projDataNeededVars && projDataNeededVars->
getSize()>0) {
2086 fullNormSet.
add(*projDataNeededVars) ;
2102 if (o.
projData && projDataNeededVars && projDataNeededVars->
getSize()>0) {
2112 if (sliceDataSet->
getSize()>0) {
2125 if ((real = dynamic_cast<RooAbsRealLValue*>(sliceVar))) {
2127 }
else if ((cat = dynamic_cast<RooAbsCategoryLValue*>(sliceVar))) {
2133 delete sliceDataSet ;
2135 if (!cutString.
IsNull()) {
2137 coutI(
Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") reducing given projection dataset to entries with " << cutString << endl ;
2142 <<
") only the following components of the projection data will be used: " << *projDataNeededVars << endl ;
2146 if (!o.
binProjData && dynamic_cast<RooDataSet*>(projDataSel)!=0) {
2153 if (!dynamic_cast<RooCategory*>(arg2)) allCat =
kFALSE ;
2158 coutI(
Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") unbinned projection dataset consist only of discrete variables,"
2159 <<
" performing projection with binned copy for optimization." << endl ;
2167 if (projDataSel!=o.
projData)
delete projDataSel ;
2174 projection->
getVal(projDataSel->
get()) ;
2211 curve->
SetName(curveName.Data()) ;
2232 if (projDataSel!=o.
projData)
delete projDataSel ;
2280 curve->
SetName(curveName.Data()) ;
2301 if (projDataNeededVars)
delete projDataNeededVars ;
2303 delete projectionCompList ;
2304 delete plotCloneSet ;
2323 while((sliceArg=(
RooAbsArg*)iter->Next())) {
2326 projectedVars.
remove(*arg) ;
2329 << sliceArg->
GetName() <<
" was not projected anyway" << endl ;
2372 projDataVars.
add(*tmp) ;
2382 <<
") function doesn't depend on asymmetry category " << asymCat.
GetName() << endl ;
2389 <<
") asymmetry category must have 2 or 3 states with index values -1,0,1" << endl ;
2413 << frame->
getPlotVar()->
GetName() <<
" represents a slice in " << *sliceSetTmp << endl ;
2415 sliceSet.
add(*sliceSetTmp) ;
2416 delete sliceSetTmp ;
2440 if (projectedVars.
getSize()) {
2442 <<
" projects variables " << projectedVars << endl ;
2444 if (projDataNeededVars && projDataNeededVars->
getSize()>0) {
2446 <<
" averages using data variables "<< *projDataNeededVars << endl ;
2465 RooArgSet *posProjCompList, *negProjCompList ;
2471 depPos.
add(projDataVars) ;
2472 depNeg.
add(projDataVars) ;
2476 if (!posProj || !negProj) {
2477 coutE(
Plotting) <<
"RooAbsReal::plotAsymOn(" <<
GetName() <<
") Unable to create projections, abort" << endl ;
2483 asymName.
Append(
"_Asym[") ;
2487 asymTitle.
Append(
" Asymmetry of ") ;
2500 if (sliceDataSet->
getSize()>0) {
2513 if ((real = dynamic_cast<RooAbsRealLValue*>(sliceVar))) {
2515 }
else if ((cat = dynamic_cast<RooAbsCategoryLValue*>(sliceVar))) {
2521 delete sliceDataSet ;
2523 if (!cutString.
IsNull()) {
2526 <<
") reducing given projection dataset to entries with " << cutString << endl ;
2531 <<
") only the following components of the projection data will be used: " << *projDataNeededVars << endl ;
2541 ((
RooAbsReal*)posProj)->attachDataSet(*projDataSel) ;
2542 ((
RooAbsReal*)negProj)->attachDataSet(*projDataSel) ;
2576 if (projDataSel!=o.
projData)
delete projDataSel ;
2603 curve->
SetName(curveName.Data()) ;
2615 delete posProjCompList ;
2616 delete negProjCompList ;
2649 vector<int> fpf_idx ;
2653 paramList.
add(*par) ;
2654 fpf_idx.push_back(i) ;
2658 vector<Double_t> plusVar, minusVar ;
2665 for (
Int_t ivar=0 ; ivar<paramList.
getSize() ; ivar++) {
2673 ((
RooRealVar*)paramList.
at(ivar))->setVal(cenVal+errVal) ;
2674 plusVar.push_back(cloneFunc->
getVal(nset)) ;
2677 ((
RooRealVar*)paramList.
at(ivar))->setVal(cenVal-errVal) ;
2678 minusVar.push_back(cloneFunc->
getVal(nset)) ;
2684 vector<double> errVec(paramList.
getSize()) ;
2685 for (
int i=0 ; i<paramList.
getSize() ; i++) {
2686 errVec[i] =
sqrt(V(i,i)) ;
2687 for (
int j=i ; j<paramList.
getSize() ; j++) {
2688 C(i,j) = V(i,j)/
sqrt(V(i,i)*V(j,j)) ;
2695 for (
unsigned int j=0 ; j<plusVar.size() ; j++) {
2696 F[j] = (plusVar[j]-minusVar[j])/2 ;
2703 delete errorParams ;
2745 pc.
stripCmdList(plotArgListTmp,
"VisualizeError,MoveToBack") ;
2752 if (std::string(
"Normalization")==cmd->
GetName()) {
2755 plotArgList.
Add(cmd) ;
2758 plotArgList.
Add(cmd) ;
2785 coutI(
Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") INFO: visualizing " << Z <<
"-sigma uncertainties in parameters "
2786 << *errorParams <<
" from fit result " << fr.
GetName() <<
" using " << n <<
" samplings." << endl ;
2791 RooDataSet*
d = paramPdf->generate(*errorParams,n) ;
2792 vector<RooCurve*> cvec ;
2794 *cloneParams = (*d->
get(i)) ;
2796 cloneFunc->
plotOn(frame,tmp2) ;
2797 cvec.push_back(frame->
getCurve()) ;
2810 for (vector<RooCurve*>::iterator i=cvec.begin() ; i!=cvec.end() ; i++) {
2835 vector<int> fpf_idx ;
2839 paramList.add(*par) ;
2840 fpf_idx.push_back(i) ;
2844 vector<RooCurve*> plusVar, minusVar ;
2853 for (
Int_t ivar=0 ; ivar<paramList.getSize() ; ivar++) {
2861 ((
RooRealVar*)paramList.at(ivar))->setVal(cenVal+Z*errVal) ;
2865 cloneFunc->
plotOn(frame,tmp2) ;
2866 plusVar.push_back(frame->
getCurve()) ;
2871 ((
RooRealVar*)paramList.at(ivar))->setVal(cenVal-Z*errVal) ;
2873 cloneFunc->
plotOn(frame,tmp3) ;
2874 minusVar.push_back(frame->
getCurve()) ;
2877 ((
RooRealVar*)paramList.at(ivar))->setVal(cenVal) ;
2881 vector<double> errVec(paramList.getSize()) ;
2882 for (
int i=0 ; i<paramList.getSize() ; i++) {
2883 errVec[i] =
sqrt(V(i,i)) ;
2884 for (
int j=i ; j<paramList.getSize() ; j++) {
2885 C(i,j) = V(i,j)/
sqrt(V(i,i)*V(j,j)) ;
2895 for (vector<RooCurve*>::iterator i=plusVar.begin() ; i!=plusVar.end() ; i++) {
2898 for (vector<RooCurve*>::iterator i=minusVar.begin() ; i!=minusVar.end() ; i++) {
2905 if (!band)
return frame ;
2909 pc.
defineString(
"curveNameSuffix",
"CurveNameSuffix",0,
"") ;
2910 pc.
defineInt(
"lineColor",
"LineColor",0,-999) ;
2911 pc.
defineInt(
"lineStyle",
"LineStyle",0,-999) ;
2912 pc.
defineInt(
"lineWidth",
"LineWidth",0,-999) ;
2913 pc.
defineInt(
"fillColor",
"FillColor",0,-999) ;
2914 pc.
defineInt(
"fillStyle",
"FillStyle",0,-999) ;
2916 pc.
defineInt(
"curveInvisible",
"Invisible",0,0) ;
2917 pc.
defineInt(
"moveToBack",
"MoveToBack",0,0) ;
2978 <<
":plotOn: frame does not specify a plot variable" << endl;
2983 if(!dynamic_cast<RooAbsRealLValue*>(var)) {
3013 <<
" allVars = " << (allVars?(*allVars):
RooArgSet()) << endl ;
3019 projectedVars.
add(*allVars) ;
3024 projectedVars.
remove(*found);
3034 <<
" from projection set because it a server of " << plotVar->
GetName() << endl ;
3035 projectedVars.
remove(*tmp) ;
3039 delete plotServers ;
3043 <<
") WARNING: cannot project out frame variable ("
3044 << found->
GetName() <<
"), ignoring" << endl ;
3056 <<
") function doesn't depend on projection variable "
3057 << arg->
GetName() <<
", ignoring" << endl ;
3096 if(binding && !binding->
isValid()) {
3120 }
else if (source->
getAttribute(
"INTEGER_TREE_BRANCH")) {
3126 }
else if (source->
getAttribute(
"SIGNEDBYTE_TREE_BRANCH")) {
3128 }
else if (source->
getAttribute(
"UNSIGNED_INTEGER_TREE_BRANCH")) {
3177 <<
" is an array and cannot be attached to a RooAbsReal" << endl ;
3183 if (!typeName.CompareTo(
"Float_t")) {
3185 <<
" will be converted to double precision" << endl ;
3189 }
else if (!typeName.CompareTo(
"Int_t")) {
3191 <<
" will be converted to double precision" << endl ;
3195 }
else if (!typeName.CompareTo(
"UChar_t")) {
3197 <<
" will be converted to double precision" << endl ;
3201 }
else if (!typeName.CompareTo(
"Bool_t")) {
3203 <<
" will be converted to double precision" << endl ;
3207 }
else if (!typeName.CompareTo(
"Char_t")) {
3209 <<
" will be converted to double precision" << endl ;
3213 }
else if (!typeName.CompareTo(
"UInt_t")) {
3215 <<
" will be converted to double precision" << endl ;
3219 }
else if (!typeName.CompareTo(
"Double_t")) {
3222 coutE(
InputArguments) <<
"RooAbsReal::attachToTree(" <<
GetName() <<
") data type " << typeName <<
" is not supported" << endl ;
3394 const TList &nameList)
const
3403 matched.
add(*found);
3417 if(isMatched) matchedArgs.
add(matched);
3466 if (config)
return config ;
3479 if (config)
return config ;
3591 if (inLogEvalError) {
3594 inLogEvalError =
kTRUE ;
3599 if (serverValueString) {
3604 oocoutE((
TObject*)0,
Eval) <<
"RooAbsReal::logEvalError(" <<
"<STATIC>" <<
") evaluation error, " << endl
3605 <<
" origin : " << origName << endl
3606 <<
" message : " << ee.
_msg << endl
3607 <<
" server values: " << ee.
_srvval << endl ;
3614 inLogEvalError =
kFALSE ;
3646 if (inLogEvalError) {
3649 inLogEvalError =
kTRUE ;
3654 if (serverValueString) {
3674 ostringstream oss2 ;
3678 coutE(
Eval) <<
"RooAbsReal::logEvalError(" <<
GetName() <<
") evaluation error, " << endl
3679 <<
" origin : " << oss2.str() << endl
3680 <<
" message : " << ee.
_msg << endl
3681 <<
" server values: " << ee.
_srvval << endl ;
3690 <<
") delayed evaluation error, " << endl
3691 <<
" origin : " << oss2.str() << endl
3692 <<
" message : " << oee.
_msg << endl
3693 <<
" server values: " << oee.
_srvval << endl ;
3700 inLogEvalError =
kFALSE ;
3736 if (maxPerNode<0)
return ;
3738 map<const RooAbsArg*,pair<string,list<EvalError> > >::iterator
iter =
_evalErrorList.begin() ;
3741 if (maxPerNode==0) {
3744 os << iter->second.first ;
3746 os <<
" has " << iter->second.second.size() <<
" errors" << endl ;
3751 os << iter->second.first << endl ;
3755 std::list<EvalError>::iterator iter2 = iter->second.second.begin() ;
3756 for(;iter2!=iter->second.second.end() ; ++iter2, i++) {
3757 os <<
" " << iter2->_msg <<
" @ " << iter2->_srvval << endl ;
3759 os <<
" ... (remaining " << iter->second.second.size() - maxPerNode <<
" messages suppressed)" << endl ;
3779 map<const RooAbsArg*,pair<string,list<EvalError> > >::iterator
iter =
_evalErrorList.begin() ;
3781 ntot += iter->second.second.size() ;
3856 orderedObs.
add(obs) ;
3916 pc.
defineInt(
"numScanBins",
"ScanParameters",0,1000) ;
3917 pc.
defineInt(
"intOrder",
"ScanParameters",1,2) ;
3918 pc.
defineInt(
"doScanNum",
"ScanNum",0,1) ;
3919 pc.
defineInt(
"doScanAll",
"ScanAll",0,0) ;
3920 pc.
defineInt(
"doScanNon",
"ScanNone",0,0) ;
3924 pc.
process(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) ;
3954 coutI(
NumIntegration) <<
"RooAbsPdf::createRunningIntegral(" <<
GetName() <<
") integration over observable(s) " << iset <<
" involves numeric integration," << endl
3955 <<
" constructing cdf though numeric integration of sampled pdf in " << numScanBins <<
" bins and applying order "
3956 << intOrder <<
" interpolation on integrated histogram." << endl
3957 <<
" To override this choice of technique use argument ScanNone(), to change scan parameters use ScanParameters(nbins,order) argument" << endl ;
3975 ivar->
setBins(numScanBins,
"numcdf") ;
3995 if (dynamic_cast<RooRealVar*>(arg)) {
4019 cloneList.
add(*cloneArg) ;
4025 loList.
add(*cloneLo) ;
4058 coutE(
InputArguments) <<
"RooAbsReal::functor(" <<
GetName() <<
") ERROR: one or more specified observables are not variables of this p.d.f" << endl ;
4064 coutE(
InputArguments) <<
"RooAbsReal::functor(" <<
GetName() <<
") ERROR: one or more specified parameters are not variables of this p.d.f" << endl ;
4085 coutE(
InputArguments) <<
"RooAbsReal::functor(" <<
GetName() <<
") ERROR: one or more specified observables are not variables of this p.d.f" << endl ;
4091 coutE(
InputArguments) <<
"RooAbsReal::functor(" <<
GetName() <<
") ERROR: one or more specified parameters are not variables of this p.d.f" << endl ;
4099 for (
int i=0 ; i<obs.
getSize() ; i++) {
4100 if (dynamic_cast<RooRealVar*>(obs.
at(i))==0) {
4105 for (
int i=0 ; i<pars.
getSize() ; i++) {
4106 if (dynamic_cast<RooRealVar*>(pars.
at(i))==0) {
4139 <<
" observables specified, but a ROOT TFx can only have 1,2 or 3 observables" << endl ;
4144 for (
int i=0 ; i<pars.
getSize() ; i++) {
4146 tf->SetParameter(i,p->
getVal()) ;
4147 tf->SetParName(i,p->
GetName()) ;
4162 return new RooDerivative(name.c_str(),title.c_str(),*
this,obs,order,eps) ;
4174 return new RooDerivative(name.c_str(),title.c_str(),*
this,obs,normSet,order,eps) ;
4186 string title=
Form(
"%sMoment of order %d of %s w.r.t %s ",(central?
"Central ":
""),order,
GetName(),obs.
GetName()) ;
4187 if (order==1)
return new RooFirstMoment(name.c_str(),title.c_str(),*
this,obs) ;
4188 if (order==2)
return new RooSecondMoment(name.c_str(),title.c_str(),*
this,obs,central,takeRoot) ;
4189 return new RooMoment(name.c_str(),title.c_str(),*
this,obs,order,central,takeRoot) ;
4201 string title=
Form(
"%sMoment of order %d of %s w.r.t %s ",(central?
"Central ":
""),order,
GetName(),obs.
GetName()) ;
4203 if (order==1)
return new RooFirstMoment(name.c_str(),title.c_str(),*
this,obs,normObs,intNormObs) ;
4204 if (order==2)
return new RooSecondMoment(name.c_str(),title.c_str(),*
this,obs,normObs,central,takeRoot,intNormObs) ;
4205 return new RooMoment(name.c_str(),title.c_str(),*
this,obs,normObs,order,central,takeRoot,intNormObs) ;
4337 return new RooChi2Var(name.c_str(),name.c_str(),*
this,data,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) ;
4361 return createChi2(data,*cmds[0],*cmds[1],*cmds[2],*cmds[3],*cmds[4],*cmds[5],*cmds[6],*cmds[7]) ;
4480 pc.
defineInt(
"integrate",
"Integrate",0,0) ;
4496 return new RooXYChi2Var(name.c_str(),name.c_str(),*
this,data,*yvar,integrate) ;
4498 return new RooXYChi2Var(name.c_str(),name.c_str(),*
this,data,integrate) ;
4517 pc.
defineInt(
"optConst",
"Optimize",0,1) ;
4521 pc.
defineInt(
"plevel",
"PrintLevel",0,1) ;
4523 pc.
defineInt(
"initHesse",
"InitialHesse",0,0) ;
4527 pc.
defineInt(
"numee",
"PrintEvalErrors",0,10) ;
4549 #ifdef __ROOFIT_NOROOMINIMIZER
4550 const char* minType =0 ;
4552 const char* minType = pc.
getString(
"mintype",
"OldMinuit") ;
4553 const char* minAlg = pc.
getString(
"minalg",
"minuit") ;
4570 #ifdef __ROOFIT_NOROOMINIMIZER
4573 if (
"OldMinuit" ==
string(minType)) {
4595 ret = m.
fit(fitOpt) ;
4629 m.
minos(*minosSet) ;
4639 ret = m.
save(name.c_str(),title.c_str()) ;
4644 #ifndef __ROOFIT_NOROOMINIMIZER
4666 ret = m.
fit(fitOpt) ;
4700 m.
minos(*minosSet) ;
4710 ret = m.
save(name.c_str(),title.c_str()) ;
4752 while((arg=iter.
next())) {
4755 <<
") function does not depend on listed parameter " << arg->
GetName() <<
", ignoring" << endl ;
4758 if (plist.size()>0) plist +=
":" ;
virtual Bool_t isValid() const
Check if current value is valid.
std::string contentsString() const
Return comma separated list of contained object names as STL string.
void setAttribute(const Text_t *name, Bool_t value=kTRUE)
Set (default) or clear a named boolean attribute of this object.
static RooNumIntConfig & defaultConfig()
Return reference to instance of default numeric integrator configuration object.
virtual const char * GetTitle() const
Returns title of object.
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
virtual void SetLineWidth(Width_t lwidth)
void setInterpolationOrder(Int_t order)
Set interpolation order of RooHistFunct representing cache histogram.
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 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.
Bool_t postRangeFracScale
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 void print(std::ostream &os, Bool_t addContents=kFALSE) const
Print proxy name.
static void globalSelectComp(Bool_t flag)
Global switch controlling the activation of the selectComp() functionality.
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
virtual std::list< Double_t > * binBoundaries(RooAbsRealLValue &, Double_t, Double_t) const
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
void setShapeDirty() const
void setServerValues(const char *tmp)
void setPrintEvalErrors(Int_t numEvalErrors)
Bool_t hasProcessed(const char *cmdName) const
Return true if RooCmdArg with name 'cmdName' has been processed.
Bool_t matchArgsByName(const RooArgSet &allArgs, RooArgSet &matchedArgs, const TList &nameList) const
Check if allArgs contains matching elements for each name in nameList.
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.
RooNumIntConfig holds the configuration parameters of the various numeric integrators used by RooReal...
void setVerbose(Bool_t flag=kTRUE)
void optimizeConst(Int_t flag)
If flag is true, perform constant term optimization on function being minimized.
const char * addToCurveName
virtual RooAbsReal * lowBoundFunc() const
void sort(Bool_t ascend=kTRUE)
static RooNumIntConfig * defaultIntegratorConfig()
Returns the default numeric integration configuration for all RooAbsReals.
const RooArgList & floatParsFinal() const
virtual void SetBranchStatus(const char *bname, Bool_t status=1, UInt_t *found=0)
Set branch status to Process or DoNotProcess.
Bool_t overlaps(const RooAbsCollection &otherColl) const
Check if this and other collection have common entries.
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...
Collectable string class.
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'.
void setPlotLabel(const char *label)
Set the label associated with this variable.
RooAbsCollection * selectCommon(const RooAbsCollection &refColl) const
Create a subset of the current collection, consisting only of those elements that are contained as we...
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...
RooCmdArg ZVar(const RooAbsRealLValue &var, const RooCmdArg &arg=RooCmdArg::none())
TString cleanBranchName() const
Construct a mangled name from the actual name that is free of any math symbols that might be interpre...
virtual Double_t evaluate() const =0
virtual void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Structure printing.
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'.
Bool_t isSelectedComp() const
If true, the current pdf is a selected component (for use in plotting)
virtual Bool_t replace(const RooAbsArg &var1, const RooAbsArg &var2)
Replace var1 with var2 and return kTRUE for success.
RooFIter fwdIterator() const
virtual Int_t getIndex() const
Return index number of current state.
void setString(Int_t idx, const char *value)
virtual Int_t GetDimension() const
virtual RooAbsReal * highBoundFunc() const
virtual void SetName(const char *name)
Change (i.e.
RooArgSet * getObservables(const RooArgSet &set, Bool_t valueOnly=kTRUE) const
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 Bool_t isFundamental() const
RooAbsMoment * moment(RooRealVar &obs, Int_t order, Bool_t central, Bool_t takeRoot)
Return function representing moment of function of given order.
Class RooNumRunningInt is an implementation of RooAbsCachedReal that represents a running integral t...
void setBuffer(RooAbsReal *real, Double_t *newBuf)
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 RooAbsArg * cloneTree(const char *newname=0) const
Clone tree expression of objects.
void SetCompressionLevel(Int_t level=1)
Set compression level.
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...
const char * getString(Int_t idx) const
static std::map< const RooAbsArg *, std::pair< std::string, std::list< EvalError > > > _evalErrorList
virtual Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=0) const
Interface function getAnalyticalIntergral advertises the analytical integrals that are supported...
Int_t minos()
Execute MINOS.
TString integralNameSuffix(const RooArgSet &iset, const RooArgSet *nset=0, const char *rangeName=0, Bool_t omitEmpty=kFALSE) const
Construct string with unique suffix name to give to integral object that encodes integrated observabl...
Bool_t 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 ...
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...
virtual Double_t getMin(const char *name=0) const
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...
static Int_t numEvalErrorItems()
void constOptimizeTestStatistic(ConstOpCode opcode, Bool_t doAlsoTrackingOpt=kTRUE)
Driver function to propagate constant term optimizations in test statistic.
virtual TObject * Clone(const char *newName=0) const
Make a clone of an object using the Streamer facility.
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...
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.
virtual void SetFillStyle(Style_t fstyle)
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 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 GetNbinsX() const
Bool_t addOwnedComponents(const RooArgSet &comps)
Take ownership of the contents of 'comps'.
Bool_t isValueDirtyAndClear() const
Int_t migrad()
Execute MIGRAD.
void setStrategy(Int_t strat)
Change MINUIT strategy to istrat.
TString & Prepend(const char *cs)
static std::string format(double x, double y, int digits, int width)
const TKDTreeBinning * bins
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'.
RooAbsProxy * getProxy(Int_t index) const
Return the nth proxy from the proxy list.
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...
RooCmdArg SupNormSet(const RooArgSet &nset)
Bool_t getAttribute(const Text_t *name) const
Check if a named attribute is set. By default, all attributes are unset.
virtual Double_t expectedEvents(const RooArgSet *nset) const
Return expected number of events from this p.d.f for use in extended likelihood calculations.
static void setHideOffset(Bool_t flag)
TObject * getObject(Int_t idx) const
Return the name of the object at slot 'idx' in this RooPlot.
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.
Double_t GetMaximum(Double_t maxval=FLT_MAX) 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.
RooAbsArg * createFundamental(const char *newname=0) const
Create a RooRealVar fundamental object with our properties.
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 const RooArgSet * get() const
const char * curveNameSuffix
Double_t traceEval(const RooArgSet *set) const
Calculate current value of object, with error tracing wrapper.
virtual void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Implement multi-line detailed printing.
const Text_t * getStringAttribute(const Text_t *key) const
Get string attribute mapped under key 'key'.
const char * Data() const
RooAbsArg * first() const
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...
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.
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)
const RooArgSet & numIntRealVars() const
virtual Int_t SetBranchAddress(const char *bname, void *add, TBranch **ptr=0)
Change branch address, dealing with clone trees properly.
const char Int_t const char TProof Int_t stype
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)
RooArgSet * getVariables(Bool_t stripDisconnected=kTRUE) const
Return RooArgSet with all variables (tree leaf nodes of expresssion tree)
virtual Bool_t addOwned(RooAbsArg &var, Bool_t silent=kFALSE)
Add element to an owning set.
double cdf(double *x, double *p)
virtual void preferredObservableScanOrder(const RooArgSet &obs, RooArgSet &orderedObs) const
Interface method for function objects to indicate their prefferred order of observables for scanning ...
virtual void writeToStream(std::ostream &os, Bool_t compact) const
Write object contents to stream (dummy for now)
virtual Double_t analyticalIntegralWN(Int_t code, const RooArgSet *normSet, const char *rangeName=0) const
Implements the actual analytical integral(s) advertised by getAnalyticalIntegral. ...
RooVectorDataStore is the abstract base class for data collection that use a TTree as internal storag...
const Text_t * getUnit() const
Int_t setPrintLevel(Int_t newLevel)
Change the MINUIT internal printing level.
std::map< std::string, std::string >::const_iterator iter
std::map< const RooAbsArg *, std::pair< std::string, std::list< EvalError > > >::const_iterator EvalErrorIter
TIterator * createIterator(Bool_t dir=kIterForward) const
void setOwning(Bool_t flag)
virtual TObject * Clone(const char *newname=0) const
Make a clone of an object using the Streamer facility.
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.
if(pyself &&pyself!=Py_None)
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...
if on multiple lines(like in C++).**The" * configuration fragment. * * The "import myobject continue
Parses the configuration file.
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...
virtual Bool_t checkObservables(const RooArgSet *nset) const
Overloadable function in which derived classes can implement consistency checks of the variables...
TString & Append(const char *cs)
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.
Bool_t dependsOnValue(const RooAbsCollection &serverList, const RooAbsArg *ignoreArg=0) const
TIterator * MakeIterator(Bool_t dir=kTRUE) const
Return an iterator over this list.
virtual Bool_t isIdentical(const RooAbsArg &other, Bool_t assumeSameType=kFALSE)
Double_t getVal(const RooArgSet *set=0) const
void setParameterizeIntegral(const RooArgSet ¶mVars)
virtual Double_t getValV(const RooArgSet *set=0) const
Return value of object.
void setBins(Int_t nBins, const char *name=0)
Double_t getPropagatedError(const RooFitResult &fr)
Calculate error on self by propagated errors on parameters with correlations as given by fit result T...
RooAbsCategoryLValue is the common abstract base class for objects that represent a discrete value th...
Bool_t isSignType(Bool_t mustHaveZero=kFALSE) const
Determine if category has 2 or 3 states with index values -1,0,1.
virtual void SetBinError(Int_t bin, Double_t error)
see convention for numbering bins in TH1::GetBin
const char * projectionRangeName
Double_t Erfc(Double_t x)
Compute the complementary error function erfc(x).
const char * getPlotLabel() const
Get the label associated with the variable.
virtual TLeaf * GetLeafCounter(Int_t &countval) const
Return a pointer to the counter of this leaf.
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...
RooArgSet * getParameters(const RooAbsData *data, Bool_t stripDisconnected=kTRUE) const
Create a list of leaf nodes in the arg tree starting with ourself as top node that don't match any of...
void stripCmdList(RooLinkedList &cmdList, const char *cmdsToPurge)
Utility function that strips command names listed (comma separated) in cmdsToPurge from cmdList...
RooRealVar represents a fundamental (non-derived) real valued object.
virtual const RooArgSet * get() const
virtual TBranch * GetBranch(const char *name)
Return pointer to the branch with the given name in this tree or its friends.
static Int_t _evalErrorCount
virtual Int_t Fill()
Loop on all leaves of this branch to fill Basket buffer.
virtual void setVal(Double_t value)
Set value of variable to 'value'.
virtual void SetLineColor(Color_t lcolor)
virtual void Add(TObject *arg)
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 ...
RooNameSet is a utility class that stores the names the objects in a RooArget.
Bool_t operator==(Double_t value) const
Equality operator comparing to a Double_t.
virtual Double_t analyticalIntegral(Int_t code, const char *rangeName=0) const
Implements the actual analytical integral(s) advertised by getAnalyticalIntegral. ...
void defineMutex(const char *argName1, const char *argName2)
Define arguments named argName1 and argName2 mutually exclusive.
virtual const char * GetTypeName() const
Int_t numProxies() const
Return the number of registered proxies.
Int_t getInt(const char *name, Int_t defaultValue=0)
Return integer property registered with name 'name'.
TString GetString() const
RooNumIntConfig * _specIntegratorConfig
RooFit::MPSplit interleave
Class to manage histogram axis.
RooAbsArg * find(const char *name) const
Find object with given name in list.
static Int_t numEvalErrors()
Return the number of logged evaluation errors since the last clearing.
TPaveLabel title(3, 27.1, 15, 28.7,"ROOT Environment and Tools")
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.
friend class RooCustomizer
virtual void SetFillColor(Color_t fcolor)
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.
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 setProfile(Bool_t flag=kTRUE)
virtual const char * ClassName() const
Returns name of class to which the object belongs.
Lightweight interface adaptor that exports a RooAbsReal as a ROOT::Math::IGenFunction.
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 numEntries() const
const RooNumIntConfig * getIntegratorConfig() const
Return the numeric integration configuration used for this object.
void SetName(const char *name)
Change (i.e.
Implement the abstract 1-dimensional root finding interface using the Brent-Decker method...
char * Form(const char *fmt,...)
virtual ExtendMode extendMode() const
RooCachedReal is an implementation of RooAbsCachedReal that can cache any external RooAbsReal input f...
const TMatrixDSym & covarianceMatrix() const
Return covariance matrix.
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.
virtual Int_t GetNbinsZ() const
RooAbsArg * absArg() const
const RooArgSet * projSet
virtual const char * GetName() const
Returns name of object.
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...
TObject * FindObject(const char *name) const
Return pointer to obejct with given name.
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...
Class RooCmdConfig is a configurable parser for RooCmdArg named arguments.
RooAbsData is the common abstract base class for binned and unbinned datasets.
Bool_t ok(Bool_t verbose) const
Return true of parsing was successful.
void setPrintEvalErrors(Int_t numEvalErrors)
const RooAbsData * projData
static void indent(ostringstream &buf, int indent_level)
RooAbsRealLValue * getPlotVar() const
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)
Bool_t plotSanityChecks(RooPlot *frame) const
Utility function for plotOn(), perform general sanity check on frame to ensure safe plotting operatio...
RooCategory represents a fundamental (non-derived) discrete value object.
UChar_t _byteValue
Transient cache for bool values from tree branches.
static Bool_t hideOffset()
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString.
virtual Int_t getMaxVal(const RooArgSet &vars) const
Advertise capability to determine maximum value of function for given set of observables.
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.
A RooPlot is a plot frame and a container for graphics objects within that frame. ...
Double_t binVolume() const
RooSecondMoment represents the first, second, or third order derivative of any RooAbsReal as calculat...
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'.
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...
RooAbsBinning is the abstract base class for RooRealVar binning definitions This class defines the in...
virtual Bool_t isParameterized() const
virtual Int_t GetSize() const
void Delete(Option_t *o=0)
Remove all elements in collection and delete all elements NB: Collection does not own elements...
RooAbsArg * at(Int_t idx) const
virtual Double_t offset() const
const char * normRange() const
virtual const char * GetName() const
Returns name of object.
void select(Int_t replica=1, Int_t color=kGreen)
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
RooFIter fwdIterator() const
RooAbsReal()
coverity[UNINIT_CTOR] Default constructor
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...
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.
virtual TObject * Clone(const char *newname=0) const
Make a clone of an object using the Streamer facility.
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
static ErrorLoggingMode evalErrorLoggingMode()
Return current evaluation error logging mode.
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.
void setValueDirty() const
RooCmdArg NormRange(const char *rangeNameList)
TObjArray * GetListOfLeaves()
Int_t GetEntries() const
Return the number of objects in array (i.e.
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...
virtual Int_t numEntries() const
Return the number of bins.
Int_t minimize(const char *type, const char *alg=0)
virtual void SetLineStyle(Style_t lstyle)
const RooLinkedList & getObjectList(const char *name)
Return list of objects registered with name 'name'.
RooArgSet * getComponents() 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 ...
static Bool_t _cacheCheck
static Bool_t _globalSelectComp
Component selection flag for RooAbsPdf::plotCompOn.
void setCloneBranchSet(RooArgSet &cloneBranchSet)
Install the input RooArgSet as container in which all cloned branches will be stored.
virtual Double_t GetBinCenter(Int_t bin) const
Return center of bin.
void setRange(const char *name, Double_t min, Double_t max)
Set range named 'name to [min,max].
Mother of all ROOT objects.
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
Int_t setPrintLevel(Int_t newLevel)
Change the MINUIT internal printing level.
virtual Bool_t remove(const RooAbsArg &var, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE)
Remove the specified argument from our list.
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 ...
RooArgProxy is the abstact interface for RooAbsArg proxy classes.
virtual Int_t Branch(TCollection *list, Int_t bufsize=32000, Int_t splitlevel=99, const char *name="")
Create one branch for each element in the collection.
virtual Double_t getMax(const char *name=0) const
Int_t hesse()
Execute HESSE.
virtual void printValue(std::ostream &os) const
Print object value.
static Bool_t _hideOffset
virtual Int_t GetNbinsY() const
RooDerivative represents the first, second, or third order derivative of any RooAbsReal as calculated...
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...
virtual TObject * clone(const char *newname) const
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.
const RooArgSet * getNormVars() const
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...
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)
TString getTitle(Bool_t appendUnit=kFALSE) const
Return this variable's title string.
RooMinimizer is a wrapper class around ROOT::Fit:Fitter that provides a seamless interface between th...
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...
Double_t GetMinimum(Double_t minval=-FLT_MAX) const
virtual RooAbsReal * createProfile(const RooArgSet ¶msOfInterest)
Create a RooProfileLL object that eliminates all nuisance parameters in the present function...
virtual TObject * Next()=0
OperMode operMode() const
virtual void setTreeBranchStatus(TTree &t, Bool_t active)
(De)Activate associated tree branch
static void setCacheCheck(Bool_t flag)
Activate cache validation mode.
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 TIterator * MakeIterator(Bool_t dir=kIterForward) const
Return a list iterator.
virtual Double_t maxVal(Int_t code) const
Return maximum value for set of observables identified by code assigned in getMaxVal.
virtual RooAbsArg * addClone(const RooAbsArg &var, Bool_t silent=kFALSE)
Add clone of specified element to an owning set.
A TTree object has a header with a name and a title.
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.
void setNoWarn()
Instruct MINUIT to suppress warnings.
UInt_t _uintValue
Transient cache for signed byte values from tree branches.
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...
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.
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.
Bool_t matchArgs(const RooArgSet &allDeps, RooArgSet &numDeps, const RooArgProxy &a) const
Utility function for use in getAnalyticalIntegral().
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...
TObject * At(Int_t idx) const
void plotOnCompSelect(RooArgSet *selNodes) const
Helper function for plotting of composite p.d.fs.
virtual RooPlot * plotAsymOn(RooPlot *frame, const RooAbsCategoryLValue &asymCat, PlotOpt o) const
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
A TTree is a list of TBranches.
std::complex< float_v > Z
Bool_t recursiveRedirectServers(const RooAbsCollection &newServerList, Bool_t mustReplaceAll=kFALSE, Bool_t nameChange=kFALSE, Bool_t recurseInNewSet=kTRUE)
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...
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())
RooArgSet * select(const RooArgSet &list) const
Construct a RooArgSet of objects in input 'list' whose names match to those in the internal name list...
virtual void SetTitle(const char *title="")
Change (i.e. set) the title of the TNamed.
void logEvalError(const char *message, const char *serverValueString=0) const
Log evaluation error message.
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.
Int_t GetCompressionLevel() const
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...
virtual const RooArgSet * get(Int_t index) const
Return RooArgSet with coordinates of event 'index'.
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 Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add element to non-owning set.
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.
RooNumIntConfig * specialIntegratorConfig() const
Returns the specialized integrator configuration for this RooAbsReal.
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...
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 void selectNormalizationRange(const char *rangeName=0, Bool_t force=kFALSE)
Interface function to force use of a given normalization range to interpret function value...
RooCmdArg Binning(const RooAbsBinning &binning)
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