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;
971 projected->
SetName(name.Data()) ;
978 delete dependentIterator;
1014 if(hdim != plotVars.
getSize()) {
1023 for(
Int_t index= 0; index < plotVars.
getSize(); index++) {
1028 <<
"\" of type " << var->
ClassName() << endl;
1033 <<
":fillHistogram: WARNING: variable is not an explicit dependent: " << realVar->
GetName() << endl;
1049 if (projectedVars) {
1050 allDeps.
add(*projectedVars) ;
1064 Int_t xbins(0),ybins(1),zbins(1);
1076 assert(0 != zvar && 0 != zaxis);
1077 if (scaleForDensity) {
1085 assert(0 != yvar && 0 != yaxis);
1086 if (scaleForDensity) {
1094 assert(0 != xvar && 0 != xaxis);
1095 if (scaleForDensity) {
1101 << hdim <<
" dimensions" << endl;
1108 Int_t xbin(0),ybin(0),zbin(0);
1109 Int_t bins= xbins*ybins*zbins;
1110 for(
Int_t bin= 0; bin < bins; bin++) {
1113 if(bin % (xbins*ybins) == 0) {
1119 if(bin % xbins == 0) {
1120 ybin= (ybin%ybins) + 1;
1125 xbin= (xbin%xbins) + 1;
1135 coutW(
Plotting) <<
"WARNING: Function evaluation error(s) at coordinates [x]=" << xvar->
getVal() ;
1208 if (showProgress && (i%onePct==0)) {
1212 Double_t binVal = theClone->
getVal(normSet?normSet:obs)*scaleFactor ;
1213 if (correctForBinSize) {
1240 strlcpy(buf,varNameList,1024) ;
1241 char* varName = strtok(buf,
",:") ;
1246 varName = strtok(0,
",") ;
1248 varName = strtok(0,
",") ;
1337 pc.
defineInt(
"intBinning",
"IntrinsicBinning",0,2) ;
1338 pc.
defineInt(
"extended",
"Extended",0,2) ;
1342 pc.
defineSet(
"projObs",
"ProjectedObservables",0,0) ;
1345 pc.
defineMutex(
"SelectCompSet",
"SelectCompSpec") ;
1347 pc.
defineMutex(
"IntrinsicBinning",
"BinningName") ;
1348 pc.
defineMutex(
"IntrinsicBinning",
"BinningSpec") ;
1376 if (!pdfSelf && doExtended>0) {
1377 coutW(
InputArguments) <<
"RooAbsReal::createHistogram(" <<
GetName() <<
") WARNING extended mode requested for a non-pdf object, ignored" << endl ;
1381 coutW(
InputArguments) <<
"RooAbsReal::createHistogram(" <<
GetName() <<
") WARNING extended mode requested for a non-extendable pdf, ignored" << endl ;
1384 if (pdfSelf && doExtended==2) {
1388 const char* compSpec = pc.
getString(
"compSpec") ;
1390 Bool_t haveCompSel = ( (compSpec && strlen(compSpec)>0) || compSet) ;
1393 if (doIntBinning>0) {
1398 if (doIntBinning==1) {
1400 <<
") WARNING, intrinsic model binning requested for histogram, but model does not define bin boundaries, reverting to default binning"<< endl ;
1403 if (doIntBinning==2) {
1405 <<
") INFO: Model has intrinsic binning definition, selecting that binning for the histogram"<< endl ;
1408 for (list<double>::iterator it=bl->begin() ; it!=bl->end() ; ++it) { ba[i++] = *it ; }
1409 intBinning =
new RooBinning(bl->size()-1,ba) ;
1415 pc.
stripCmdList(argListCreate,
"Scaling,ProjectedObservables,IntrinsicBinning,SelectCompSet,SelectCompSpec,Extended") ;
1420 argListCreate.
Add(&tmp) ;
1438 if (!dynamic_cast<RooAbsReal*>(arg)) {
1439 branchNodeSet.
remove(*arg) ;
1450 if (dirSelNodes->
getSize()>0) {
1451 coutI(
Plotting) <<
"RooAbsPdf::createHistogram(" <<
GetName() <<
") directly selected PDF components: " << *dirSelNodes << endl ;
1457 coutE(
Plotting) <<
"RooAbsPdf::createHistogram(" <<
GetName() <<
") ERROR: component selection set " << *compSet <<
" does not match any components of p.d.f." << endl ;
1459 coutE(
Plotting) <<
"RooAbsPdf::createHistogram(" <<
GetName() <<
") ERROR: component selection expression '" << compSpec <<
"' does not select any components of p.d.f." << endl ;
1463 delete dirSelNodes ;
1501 if (!dynamic_cast<RooAbsReal*>(arg)) {
1502 branchNodeSet.
remove(*arg) ;
1543 selNodes->
add(tmp) ;
1544 coutI(
Plotting) <<
"RooAbsPdf::plotOn(" <<
GetName() <<
") indirectly selected PDF components: " << tmp << endl ;
1703 if (rcmd && TString(rcmd->
getString(0)).Contains(
",")) {
1707 argList.
Add(&rnorm) ;
1709 list<string> rlist ;
1714 char* oneRange = strtok(buf,
",") ;
1716 rlist.push_back(oneRange) ;
1717 oneRange = strtok(0,
",") ;
1720 for (list<string>::iterator riter=rlist.begin() ; riter!=rlist.end() ; ++riter) {
1733 pc.
defineString(
"curveNameSuffix",
"CurveNameSuffix",0,
"") ;
1742 pc.
defineInt(
"doEvalError",
"EvalErrorValue",0,0) ;
1743 pc.
defineInt(
"shiftToZero",
"ShiftToZero",0,0) ;
1748 pc.
defineSet(
"errorPars",
"VisualizeError",0) ;
1749 pc.
defineInt(
"linearMethod",
"VisualizeError",0,0) ;
1750 pc.
defineInt(
"binProjData",
"ProjData",0,0) ;
1753 pc.
defineInt(
"numee",
"PrintEvalErrors",0,10) ;
1754 pc.
defineInt(
"rangeAdjustNorm",
"Range",0,0) ;
1755 pc.
defineInt(
"rangeWNAdjustNorm",
"RangeWithName",0,0) ;
1759 pc.
defineInt(
"lineColor",
"LineColor",0,-999) ;
1760 pc.
defineInt(
"lineStyle",
"LineStyle",0,-999) ;
1761 pc.
defineInt(
"lineWidth",
"LineWidth",0,-999) ;
1762 pc.
defineInt(
"fillColor",
"FillColor",0,-999) ;
1763 pc.
defineInt(
"fillStyle",
"FillStyle",0,-999) ;
1765 pc.
defineInt(
"curveInvisible",
"Invisible",0,0) ;
1766 pc.
defineInt(
"showProg",
"ShowProgress",0,0) ;
1768 pc.
defineInt(
"interleave",
"NumCPU",1,0) ;
1772 pc.
defineInt(
"moveToBack",
"MoveToBack",0,0) ;
1776 pc.
defineMutex(
"VisualizeError",
"VisualizeErrorData") ;
1814 const char* sliceCatState = pc.
getString(
"sliceCatState",0,
kTRUE) ;
1816 if (sliceCatState) {
1825 strlcpy(buf,sliceCatState,1024) ;
1826 const char* slabel = strtok(buf,
",") ;
1838 slabel = strtok(0,
",") ;
1850 if (vlines==2) vlines=0 ;
1856 if (vlines==2) vlines=0 ;
1882 cxcoutD(
Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") Preprocessing: have slice " << *sliceSet << endl ;
1889 while((sliceArg=(
RooAbsArg*)iter->Next())) {
1892 projectedVars.
remove(*arg) ;
1895 << sliceArg->
GetName() <<
" was not projected anyway" << endl ;
1899 }
else if (projSet) {
1900 cxcoutD(
Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") Preprocessing: have projSet " << *projSet << endl ;
1903 cxcoutD(
Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") Preprocessing: have neither sliceSet nor projSet " << endl ;
1908 cxcoutD(
Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") Preprocessing: projectedVars = " << projectedVars << endl ;
1974 projDataVars.
add(*tmp) ;
1997 cxcoutD(
Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") frame->getNormVars() that are also observables = " << *sliceSetTmp << endl ;
2010 << frame->
getPlotVar()->
GetName() <<
" represents a slice in " << *sliceSetTmp << endl ;
2012 sliceSet.
add(*sliceSetTmp) ;
2013 delete sliceSetTmp ;
2019 cxcoutD(
Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") projectedVars = " << projectedVars <<
" sliceSet = " << sliceSet << endl ;
2032 if (!plotCloneSet) {
2033 coutE(
Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") Couldn't deep-clone self, abort," << endl ;
2039 if (projectedVars.
getSize()) {
2041 <<
" integrates over variables " << projectedVars
2044 if (projDataNeededVars && projDataNeededVars->
getSize()>0) {
2046 <<
" averages using data variables " << *projDataNeededVars << endl ;
2054 if (projDataNeededVars) {
2058 deps->
add(*plotVar) ;
2064 coutE(
Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") error in checkObservables, abort" << endl ;
2066 delete plotCloneSet ;
2067 if (projDataNeededVars)
delete projDataNeededVars ;
2082 fullNormSet.
add(projectedVars) ;
2083 if (projDataNeededVars && projDataNeededVars->
getSize()>0) {
2084 fullNormSet.
add(*projDataNeededVars) ;
2100 if (o.
projData && projDataNeededVars && projDataNeededVars->
getSize()>0) {
2110 if (sliceDataSet->
getSize()>0) {
2116 cutString.Append(
"&&") ;
2123 if ((real = dynamic_cast<RooAbsRealLValue*>(sliceVar))) {
2125 }
else if ((cat = dynamic_cast<RooAbsCategoryLValue*>(sliceVar))) {
2131 delete sliceDataSet ;
2133 if (!cutString.IsNull()) {
2135 coutI(
Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") reducing given projection dataset to entries with " << cutString << endl ;
2140 <<
") only the following components of the projection data will be used: " << *projDataNeededVars << endl ;
2144 if (!o.
binProjData && dynamic_cast<RooDataSet*>(projDataSel)!=0) {
2151 if (!dynamic_cast<RooCategory*>(arg2)) allCat =
kFALSE ;
2156 coutI(
Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") unbinned projection dataset consist only of discrete variables," 2157 <<
" performing projection with binned copy for optimization." << endl ;
2165 if (projDataSel!=o.
projData)
delete projDataSel ;
2172 projection->
getVal(projDataSel->
get()) ;
2192 TString curveName(projection->
GetName()) ;
2209 curve->
SetName(curveName.Data()) ;
2230 if (projDataSel!=o.
projData)
delete projDataSel ;
2270 TString curveName(projection->
GetName()) ;
2278 curve->
SetName(curveName.Data()) ;
2299 if (projDataNeededVars)
delete projDataNeededVars ;
2301 delete projectionCompList ;
2302 delete plotCloneSet ;
2321 while((sliceArg=(
RooAbsArg*)iter->Next())) {
2324 projectedVars.
remove(*arg) ;
2327 << sliceArg->
GetName() <<
" was not projected anyway" << endl ;
2370 projDataVars.
add(*tmp) ;
2380 <<
") function doesn't depend on asymmetry category " << asymCat.
GetName() << endl ;
2387 <<
") asymmetry category must have 2 or 3 states with index values -1,0,1" << endl ;
2411 << frame->
getPlotVar()->
GetName() <<
" represents a slice in " << *sliceSetTmp << endl ;
2413 sliceSet.
add(*sliceSetTmp) ;
2414 delete sliceSetTmp ;
2438 if (projectedVars.
getSize()) {
2440 <<
" projects variables " << projectedVars << endl ;
2442 if (projDataNeededVars && projDataNeededVars->getSize()>0) {
2444 <<
" averages using data variables "<< *projDataNeededVars << endl ;
2463 RooArgSet *posProjCompList, *negProjCompList ;
2469 depPos.
add(projDataVars) ;
2470 depNeg.
add(projDataVars) ;
2474 if (!posProj || !negProj) {
2475 coutE(
Plotting) <<
"RooAbsReal::plotAsymOn(" <<
GetName() <<
") Unable to create projections, abort" << endl ;
2481 asymName.Append(
"_Asym[") ;
2482 asymName.Append(asymCat.
GetName()) ;
2483 asymName.Append(
"]") ;
2484 TString asymTitle(asymCat.
GetName()) ;
2485 asymTitle.Append(
" Asymmetry of ") ;
2493 if (projDataNeededVars && projDataNeededVars->getSize()<o.
projData->
get()->
getSize()) {
2498 if (sliceDataSet->
getSize()>0) {
2504 cutString.Append(
"&&") ;
2511 if ((real = dynamic_cast<RooAbsRealLValue*>(sliceVar))) {
2513 }
else if ((cat = dynamic_cast<RooAbsCategoryLValue*>(sliceVar))) {
2519 delete sliceDataSet ;
2521 if (!cutString.IsNull()) {
2524 <<
") reducing given projection dataset to entries with " << cutString << endl ;
2529 <<
") only the following components of the projection data will be used: " << *projDataNeededVars << endl ;
2539 ((
RooAbsReal*)posProj)->attachDataSet(*projDataSel) ;
2540 ((
RooAbsReal*)negProj)->attachDataSet(*projDataSel) ;
2551 TString curveName(funcAsym->
GetName()) ;
2574 if (projDataSel!=o.
projData)
delete projDataSel ;
2593 TString curveName(funcAsym->
GetName()) ;
2601 curve->
SetName(curveName.Data()) ;
2613 delete posProjCompList ;
2614 delete negProjCompList ;
2647 vector<int> fpf_idx ;
2651 paramList.
add(*par) ;
2652 fpf_idx.push_back(i) ;
2656 vector<Double_t> plusVar, minusVar ;
2663 for (
Int_t ivar=0 ; ivar<paramList.
getSize() ; ivar++) {
2671 ((
RooRealVar*)paramList.
at(ivar))->setVal(cenVal+errVal) ;
2672 plusVar.push_back(cloneFunc->
getVal(nset)) ;
2675 ((
RooRealVar*)paramList.
at(ivar))->setVal(cenVal-errVal) ;
2676 minusVar.push_back(cloneFunc->
getVal(nset)) ;
2682 vector<double> errVec(paramList.
getSize()) ;
2683 for (
int i=0 ; i<paramList.
getSize() ; i++) {
2684 errVec[i] =
sqrt(V(i,i)) ;
2685 for (
int j=i ; j<paramList.
getSize() ; j++) {
2686 C(i,j) = V(i,j)/
sqrt(V(i,i)*V(j,j)) ;
2693 for (
unsigned int j=0 ; j<plusVar.size() ; j++) {
2694 F[j] = (plusVar[j]-minusVar[j])/2 ;
2701 delete errorParams ;
2743 pc.
stripCmdList(plotArgListTmp,
"VisualizeError,MoveToBack") ;
2750 if (std::string(
"Normalization")==cmd->
GetName()) {
2753 plotArgList.
Add(cmd) ;
2756 plotArgList.
Add(cmd) ;
2783 coutI(
Plotting) <<
"RooAbsReal::plotOn(" <<
GetName() <<
") INFO: visualizing " << Z <<
"-sigma uncertainties in parameters " 2784 << *errorParams <<
" from fit result " << fr.
GetName() <<
" using " << n <<
" samplings." << endl ;
2789 RooDataSet* d = paramPdf->generate(*errorParams,n) ;
2790 vector<RooCurve*> cvec ;
2792 *cloneParams = (*d->
get(i)) ;
2794 cloneFunc->
plotOn(frame,tmp2) ;
2795 cvec.push_back(frame->
getCurve()) ;
2808 for (vector<RooCurve*>::iterator i=cvec.begin() ; i!=cvec.end() ; i++) {
2833 vector<int> fpf_idx ;
2837 paramList.add(*par) ;
2838 fpf_idx.push_back(i) ;
2842 vector<RooCurve*> plusVar, minusVar ;
2851 for (
Int_t ivar=0 ; ivar<paramList.getSize() ; ivar++) {
2859 ((
RooRealVar*)paramList.at(ivar))->setVal(cenVal+Z*errVal) ;
2863 cloneFunc->
plotOn(frame,tmp2) ;
2864 plusVar.push_back(frame->
getCurve()) ;
2869 ((
RooRealVar*)paramList.at(ivar))->setVal(cenVal-Z*errVal) ;
2871 cloneFunc->
plotOn(frame,tmp3) ;
2872 minusVar.push_back(frame->
getCurve()) ;
2875 ((
RooRealVar*)paramList.at(ivar))->setVal(cenVal) ;
2879 vector<double> errVec(paramList.getSize()) ;
2880 for (
int i=0 ; i<paramList.getSize() ; i++) {
2881 errVec[i] =
sqrt(V(i,i)) ;
2882 for (
int j=i ; j<paramList.getSize() ; j++) {
2883 C(i,j) = V(i,j)/
sqrt(V(i,i)*V(j,j)) ;
2893 for (vector<RooCurve*>::iterator i=plusVar.begin() ; i!=plusVar.end() ; i++) {
2896 for (vector<RooCurve*>::iterator i=minusVar.begin() ; i!=minusVar.end() ; i++) {
2903 if (!band)
return frame ;
2907 pc.
defineString(
"curveNameSuffix",
"CurveNameSuffix",0,
"") ;
2908 pc.
defineInt(
"lineColor",
"LineColor",0,-999) ;
2909 pc.
defineInt(
"lineStyle",
"LineStyle",0,-999) ;
2910 pc.
defineInt(
"lineWidth",
"LineWidth",0,-999) ;
2911 pc.
defineInt(
"fillColor",
"FillColor",0,-999) ;
2912 pc.
defineInt(
"fillStyle",
"FillStyle",0,-999) ;
2914 pc.
defineInt(
"curveInvisible",
"Invisible",0,0) ;
2915 pc.
defineInt(
"moveToBack",
"MoveToBack",0,0) ;
2976 <<
":plotOn: frame does not specify a plot variable" << endl;
2981 if(!dynamic_cast<RooAbsRealLValue*>(var)) {
3011 <<
" allVars = " << (allVars?(*allVars):
RooArgSet()) << endl ;
3014 if (!allVars) return ;
3017 projectedVars.
add(*allVars) ;
3022 projectedVars.
remove(*found);
3032 <<
" from projection set because it a server of " << plotVar->
GetName() << endl ;
3033 projectedVars.
remove(*tmp) ;
3037 delete plotServers ;
3041 <<
") WARNING: cannot project out frame variable (" 3042 << found->
GetName() <<
"), ignoring" << endl ;
3054 <<
") function doesn't depend on projection variable " 3055 << arg->
GetName() <<
", ignoring" << endl ;
3094 if(binding && !binding->
isValid()) {
3118 }
else if (source->
getAttribute(
"INTEGER_TREE_BRANCH")) {
3124 }
else if (source->
getAttribute(
"SIGNEDBYTE_TREE_BRANCH")) {
3126 }
else if (source->
getAttribute(
"UNSIGNED_INTEGER_TREE_BRANCH")) {
3164 TBranch* branch = t.GetBranch(cleanName) ;
3175 <<
" is an array and cannot be attached to a RooAbsReal" << endl ;
3181 if (!typeName.CompareTo(
"Float_t")) {
3183 <<
" will be converted to double precision" << endl ;
3187 }
else if (!typeName.CompareTo(
"Int_t")) {
3189 <<
" will be converted to double precision" << endl ;
3192 t.SetBranchAddress(cleanName,&
_intValue) ;
3193 }
else if (!typeName.CompareTo(
"UChar_t")) {
3195 <<
" will be converted to double precision" << endl ;
3199 }
else if (!typeName.CompareTo(
"Bool_t")) {
3201 <<
" will be converted to double precision" << endl ;
3205 }
else if (!typeName.CompareTo(
"Char_t")) {
3207 <<
" will be converted to double precision" << endl ;
3211 }
else if (!typeName.CompareTo(
"UInt_t")) {
3213 <<
" will be converted to double precision" << endl ;
3217 }
else if (!typeName.CompareTo(
"Double_t")) {
3218 t.SetBranchAddress(cleanName,&
_value) ;
3220 coutE(
InputArguments) <<
"RooAbsReal::attachToTree(" <<
GetName() <<
") data type " << typeName <<
" is not supported" << endl ;
3232 TString
format(cleanName);
3233 format.Append(
"/D");
3234 branch = t.Branch(cleanName, &
_value, (
const Text_t*)format, bufSize);
3392 const TList &nameList)
const 3401 matched.
add(*found);
3415 if(isMatched) matchedArgs.
add(matched);
3464 if (config)
return config ;
3477 if (config)
return config ;
3589 if (inLogEvalError) {
3592 inLogEvalError =
kTRUE ;
3597 if (serverValueString) {
3602 oocoutE((
TObject*)0,
Eval) <<
"RooAbsReal::logEvalError(" <<
"<STATIC>" <<
") evaluation error, " << endl
3603 <<
" origin : " << origName << endl
3604 <<
" message : " << ee.
_msg << endl
3605 <<
" server values: " << ee.
_srvval << endl ;
3612 inLogEvalError =
kFALSE ;
3644 if (inLogEvalError) {
3647 inLogEvalError =
kTRUE ;
3652 if (serverValueString) {
3672 ostringstream oss2 ;
3676 coutE(
Eval) <<
"RooAbsReal::logEvalError(" <<
GetName() <<
") evaluation error, " << endl
3677 <<
" origin : " << oss2.str() << endl
3678 <<
" message : " << ee.
_msg << endl
3679 <<
" server values: " << ee.
_srvval << endl ;
3688 <<
") delayed evaluation error, " << endl
3689 <<
" origin : " << oss2.str() << endl
3690 <<
" message : " << oee.
_msg << endl
3691 <<
" server values: " << oee.
_srvval << endl ;
3698 inLogEvalError =
kFALSE ;
3734 if (maxPerNode<0) return ;
3736 map<const RooAbsArg*,pair<string,list<EvalError> > >::iterator iter =
_evalErrorList.begin() ;
3739 if (maxPerNode==0) {
3742 os << iter->second.first ;
3744 os <<
" has " << iter->second.second.size() <<
" errors" << endl ;
3749 os << iter->second.first << endl ;
3753 std::list<EvalError>::iterator iter2 = iter->second.second.begin() ;
3754 for(;iter2!=iter->second.second.end() ; ++iter2, i++) {
3755 os <<
" " << iter2->_msg <<
" @ " << iter2->_srvval << endl ;
3757 os <<
" ... (remaining " << iter->second.second.size() - maxPerNode <<
" messages suppressed)" << endl ;
3777 map<const RooAbsArg*,pair<string,list<EvalError> > >::iterator iter =
_evalErrorList.begin() ;
3779 ntot += iter->second.second.size() ;
3854 orderedObs.
add(obs) ;
3914 pc.
defineInt(
"numScanBins",
"ScanParameters",0,1000) ;
3915 pc.
defineInt(
"intOrder",
"ScanParameters",1,2) ;
3916 pc.
defineInt(
"doScanNum",
"ScanNum",0,1) ;
3917 pc.
defineInt(
"doScanAll",
"ScanAll",0,0) ;
3918 pc.
defineInt(
"doScanNon",
"ScanNone",0,0) ;
3922 pc.
process(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) ;
3952 coutI(
NumIntegration) <<
"RooAbsPdf::createRunningIntegral(" <<
GetName() <<
") integration over observable(s) " << iset <<
" involves numeric integration," << endl
3953 <<
" constructing cdf though numeric integration of sampled pdf in " << numScanBins <<
" bins and applying order " 3954 << intOrder <<
" interpolation on integrated histogram." << endl
3955 <<
" To override this choice of technique use argument ScanNone(), to change scan parameters use ScanParameters(nbins,order) argument" << endl ;
3973 ivar->
setBins(numScanBins,
"numcdf") ;
3993 if (dynamic_cast<RooRealVar*>(arg)) {
4017 cloneList.
add(*cloneArg) ;
4023 loList.
add(*cloneLo) ;
4056 coutE(
InputArguments) <<
"RooAbsReal::functor(" <<
GetName() <<
") ERROR: one or more specified observables are not variables of this p.d.f" << endl ;
4062 coutE(
InputArguments) <<
"RooAbsReal::functor(" <<
GetName() <<
") ERROR: one or more specified parameters are not variables of this p.d.f" << endl ;
4083 coutE(
InputArguments) <<
"RooAbsReal::functor(" <<
GetName() <<
") ERROR: one or more specified observables are not variables of this p.d.f" << endl ;
4089 coutE(
InputArguments) <<
"RooAbsReal::functor(" <<
GetName() <<
") ERROR: one or more specified parameters are not variables of this p.d.f" << endl ;
4097 for (
int i=0 ; i<obs.
getSize() ; i++) {
4098 if (dynamic_cast<RooRealVar*>(obs.
at(i))==0) {
4103 for (
int i=0 ; i<pars.
getSize() ; i++) {
4104 if (dynamic_cast<RooRealVar*>(pars.
at(i))==0) {
4137 <<
" observables specified, but a ROOT TFx can only have 1,2 or 3 observables" << endl ;
4142 for (
int i=0 ; i<pars.
getSize() ; i++) {
4160 return new RooDerivative(name.c_str(),title.c_str(),*
this,obs,order,eps) ;
4172 return new RooDerivative(name.c_str(),title.c_str(),*
this,obs,normSet,order,eps) ;
4184 string title=
Form(
"%sMoment of order %d of %s w.r.t %s ",(central?
"Central ":
""),order,
GetName(),obs.
GetName()) ;
4185 if (order==1)
return new RooFirstMoment(name.c_str(),title.c_str(),*
this,obs) ;
4186 if (order==2)
return new RooSecondMoment(name.c_str(),title.c_str(),*
this,obs,central,takeRoot) ;
4187 return new RooMoment(name.c_str(),title.c_str(),*
this,obs,order,central,takeRoot) ;
4199 string title=
Form(
"%sMoment of order %d of %s w.r.t %s ",(central?
"Central ":
""),order,
GetName(),obs.
GetName()) ;
4201 if (order==1)
return new RooFirstMoment(name.c_str(),title.c_str(),*
this,obs,normObs,intNormObs) ;
4202 if (order==2)
return new RooSecondMoment(name.c_str(),title.c_str(),*
this,obs,normObs,central,takeRoot,intNormObs) ;
4203 return new RooMoment(name.c_str(),title.c_str(),*
this,obs,normObs,order,central,takeRoot,intNormObs) ;
4335 return new RooChi2Var(name.c_str(),name.c_str(),*
this,
data,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) ;
4359 return createChi2(data,*cmds[0],*cmds[1],*cmds[2],*cmds[3],*cmds[4],*cmds[5],*cmds[6],*cmds[7]) ;
4478 pc.
defineInt(
"integrate",
"Integrate",0,0) ;
4494 return new RooXYChi2Var(name.c_str(),name.c_str(),*
this,
data,*yvar,integrate) ;
4515 pc.
defineInt(
"optConst",
"Optimize",0,1) ;
4519 pc.
defineInt(
"plevel",
"PrintLevel",0,1) ;
4521 pc.
defineInt(
"initHesse",
"InitialHesse",0,0) ;
4525 pc.
defineInt(
"numee",
"PrintEvalErrors",0,10) ;
4547 #ifdef __ROOFIT_NOROOMINIMIZER 4548 const char* minType =0 ;
4550 const char* minType = pc.
getString(
"mintype",
"Minuit") ;
4551 const char* minAlg = pc.
getString(
"minalg",
"minuit") ;
4568 #ifdef __ROOFIT_NOROOMINIMIZER 4571 if (
"OldMinuit" ==
string(minType)) {
4593 ret = m.
fit(fitOpt) ;
4627 m.
minos(*minosSet) ;
4636 string title =
Form(
"Result of fit of %s ",
GetName()) ;
4637 ret = m.
save(name.c_str(),title.c_str()) ;
4642 #ifndef __ROOFIT_NOROOMINIMIZER 4664 ret = m.
fit(fitOpt) ;
4698 m.
minos(*minosSet) ;
4707 string title =
Form(
"Result of fit of %s ",
GetName()) ;
4708 ret = m.
save(name.c_str(),title.c_str()) ;
4750 while((arg=iter.
next())) {
4753 <<
") function does not depend on listed parameter " << arg->
GetName() <<
", ignoring" << endl ;
4756 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 void SetName(const char *name)
Set the name of the TNamed.
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.
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 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.
static std::string format(double x, double y, int digits, int width)
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.
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...
double cdf(double *x, double *p)
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)
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...
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)
See convention for numbering bins in TH1::GetBin.
const char * projectionRangeName
Double_t Erfc(Double_t x)
Compute the complementary error function erfc(x).
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 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'.
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.
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
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())
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.
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. ...