294 logEvalError(
"p.d.f normalization integral is zero or negative") ;
302 _value = rawVal / normVal ;
323 cxcoutD(
Eval) <<
"RooAbsPdf::analyticalIntegralWN(" <<
GetName() <<
") code = " << code <<
" normset = " << (normSet?*normSet:
RooArgSet()) << endl ;
326 if (code==0)
return getVal(normSet) ;
346 logEvalError(
Form(
"p.d.f value is Not-a-Number (%f), forcing value to zero",value)) ;
350 logEvalError(
Form(
"p.d.f value is less than zero (%f), forcing value to zero",value)) ;
355 if(!error)
return error ;
378 if (!nset)
return 1 ;
386 coutW(
Eval) <<
"RooAbsPdf::getNorm(" <<
GetName() <<
":: WARNING normalization is zero, nset = " ; nset->
Print(
"1") ;
406 return cache->
_norm ;
452 if (nsetChanged && adjustProxies) {
462 ((
RooAbsPdf*)
this)->setProxyNormSet(nset) ;
470 <<
") recreating normalization integral " << endl ;
473 cxcoutD(
Tracing) << IsA()->GetName() <<
"::syncNormalization(" <<
GetName() <<
") selfNormalized, creating unit norm" << endl;
479 TString ntitle(
GetTitle()) ; ntitle.Append(
" Unit Normalization") ;
480 TString nname(
GetName()) ; nname.Append(
"_UnitNorm") ;
491 if (cacheParamsStr && strlen(cacheParamsStr)) {
499 if (cacheParams->
getSize()>0) {
501 <<
"-dim value cache for integral over " << *depList <<
" as a function of " << *cacheParams <<
" in range " << (nr?nr:
"<default>") << endl ;
505 cachedIntegral->addOwnedComponents(*normInt) ;
506 cachedIntegral->setCacheSource(
kTRUE) ;
508 cachedIntegral->setOperMode(
ADirty) ;
510 normInt= cachedIntegral ;
610 if (
fabs(prob)>1e6) {
611 coutW(
Eval) <<
"RooAbsPdf::getLogVal(" <<
GetName() <<
") WARNING: large likelihood value: " << prob << endl ;
616 logEvalError(
"getLogVal() top-level p.d.f evaluates to a negative number") ;
622 logEvalError(
"getLogVal() top-level p.d.f evaluates to zero") ;
624 return log((
double)0);
628 logEvalError(
"getLogVal() top-level p.d.f evaluates to NaN") ;
630 return log((
double)0);
664 if (
fabs(expected)<1
e-10 &&
fabs(observed)<1
e-10) {
670 logEvalError(
"extendedTerm #expected events is <0 or NaN") ;
701 << observed <<
" events. extendedTerm = " << extra << endl;
785 pc.
defineString(
"globstag",
"GlobalObservablesTag",0,
"") ;
788 pc.
defineInt(
"splitRange",
"SplitRange",0,0) ;
791 pc.
defineInt(
"interleave",
"NumCPU",1,0) ;
793 pc.
defineInt(
"optConst",
"Optimize",0,0) ;
794 pc.
defineInt(
"cloneData",
"CloneData",2,0) ;
795 pc.
defineSet(
"projDepSet",
"ProjectedObservables",0,0) ;
797 pc.
defineSet(
"glObs",
"GlobalObservables",0,0) ;
798 pc.
defineInt(
"constrAll",
"Constrained",0,0) ;
799 pc.
defineInt(
"doOffset",
"OffsetLikelihood",0,0) ;
800 pc.
defineSet(
"extCons",
"ExternalConstraints",0,0) ;
803 pc.
defineMutex(
"GlobalObservables",
"GlobalObservablesTag") ;
813 const char* addCoefRangeName = pc.
getString(
"addCoefRange",0,
kTRUE) ;
827 cloneData = optConst ;
834 if (glObs)
delete glObs ;
837 coutI(
Minimization) <<
"User-defined specification of global observables definition with tag named '" << globsTag <<
"'" << endl ;
845 coutI(
Minimization) <<
"p.d.f. provides built-in specification of global observables definition with tag named '" << defGlobObsTag <<
"'" << endl ;
846 if (glObs)
delete glObs ;
860 doStripDisconnected=
kTRUE ;
868 coutI(
Minimization) <<
"p.d.f. provides expected number of events, including extended term in likelihood." << endl ;
882 if (rrv) rrv->
setRange(
"fit",rangeLo,rangeHi) ;
898 if (!rangeName || strchr(rangeName,
',')==0) {
902 nll =
new RooNLLVar(baseName.c_str(),
"-log(likelihood)",*
this,
data,projDeps,ext,rangeName,addCoefRangeName,numcpu,interl,
verbose,splitr,cloneData) ;
907 const size_t bufSize = strlen(rangeName)+1;
908 char* buf =
new char[bufSize] ;
909 strlcpy(buf,rangeName,bufSize) ;
910 char* token = strtok(buf,
",") ;
912 RooAbsReal* nllComp =
new RooNLLVar(
Form(
"%s_%s",baseName.c_str(),token),
"-log(likelihood)",*
this,data,projDeps,ext,token,addCoefRangeName,numcpu,interl,verbose,splitr,cloneData) ;
913 nllList.
add(*nllComp) ;
914 token = strtok(0,
",") ;
923 if (cPars && cPars->
getSize()>0) {
925 allConstraints.
add(*constraints) ;
930 allConstraints.
add(*extCons) ;
935 if (allConstraints.
getSize()>0 && cPars) {
937 coutI(
Minimization) <<
" Including the following contraint terms in minimization: " << allConstraints << endl ;
939 coutI(
Minimization) <<
"The following global observables have been defined: " << *glObs << endl ;
941 nllCons =
new RooConstraintSum(
Form(
"%s_constr",baseName.c_str()),
"nllCons",allConstraints,glObs ? *glObs : *cPars) ;
954 if (doStripDisconnected) {
1064 return fitTo(data,l) ;
1086 RooLinkedList nllCmdList = pc.
filterCmdList(fitCmdList,
"ProjectedObservables,Extended,Range,RangeWithName,SumCoefRange,NumCPU,SplitRange,Constrained,Constrain,ExternalConstraints,CloneData,GlobalObservables,GlobalObservablesTag,OffsetLikelihood") ;
1089 pc.
defineInt(
"optConst",
"Optimize",0,2) ;
1093 pc.
defineInt(
"plevel",
"PrintLevel",0,1) ;
1095 pc.
defineInt(
"initHesse",
"InitialHesse",0,0) ;
1100 pc.
defineInt(
"numee",
"PrintEvalErrors",0,10) ;
1101 pc.
defineInt(
"doEEWall",
"EvalErrorWall",0,1) ;
1103 pc.
defineInt(
"doSumW2",
"SumW2Error",0,-1) ;
1104 pc.
defineInt(
"doOffset",
"OffsetLikelihood",0,0) ;
1109 pc.
defineSet(
"extCons",
"ExternalConstraints",0,0) ;
1142 #ifdef __ROOFIT_NOROOMINIMIZER 1143 const char* minType =0 ;
1145 const char* minType = pc.
getString(
"mintype",
"Minuit") ;
1146 const char* minAlg = pc.
getString(
"minalg",
"minuit") ;
1153 if (weightedData && doSumW2==-1) {
1154 coutW(
InputArguments) <<
"RooAbsPdf::fitTo(" <<
GetName() <<
") WARNING: a likelihood fit is request of what appears to be weighted data. " << endl
1155 <<
" While the estimated values of the parameters will always be calculated taking the weights into account, " << endl
1156 <<
" there are multiple ways to estimate the errors on these parameter values. You are advised to make an " << endl
1157 <<
" explicit choice on the error calculation: " << endl
1158 <<
" - Either provide SumW2Error(kTRUE), to calculate a sum-of-weights corrected HESSE error matrix " << endl
1159 <<
" (error will be proportional to the number of events)" << endl
1160 <<
" - Or provide SumW2Error(kFALSE), to return errors from original HESSE error matrix" << endl
1161 <<
" (which will be proportional to the sum of the weights)" << endl
1162 <<
" If you want the errors to reflect the information contained in the provided dataset, choose kTRUE. " << endl
1163 <<
" If you want the errors to reflect the precision you would be able to obtain with an unweighted dataset " << endl
1164 <<
" with 'sum-of-weights' events, choose kFALSE." << endl ;
1169 if (doSumW2==1 && minos) {
1170 coutW(
InputArguments) <<
"RooAbsPdf::fitTo(" <<
GetName() <<
") WARNING: sum-of-weights correction does not apply to MINOS errors" << endl ;
1178 if (
string(minType)!=
"OldMinuit") {
1180 #ifndef __ROOFIT_NOROOMINIMIZER 1203 ret = m.
fit(fitOpt) ;
1234 if (doSumW2==1 && m.
getNPar()>0) {
1237 vector<RooNLLVar*> nllComponents;
1238 nllComponents.reserve(comps->
getSize());
1243 if (!nllComp)
continue;
1244 nllComponents.push_back(nllComp);
1251 for (vector<RooNLLVar*>::iterator it = nllComponents.begin(); nllComponents.end() != it; ++it) {
1252 (*it)->applyWeightSquared(
kTRUE);
1254 coutI(
Fitting) <<
"RooAbsPdf::fitTo(" <<
GetName() <<
") Calculating sum-of-weights-squared correction matrix for covariance matrix" << endl ;
1257 for (vector<RooNLLVar*>::iterator it = nllComponents.begin(); nllComponents.end() != it; ++it) {
1258 (*it)->applyWeightSquared(
kFALSE);
1265 CholeskyDecompGenDim<Double_t> decomp(matC.
GetNrows(), matC);
1268 <<
") ERROR: Cannot apply sum-of-weights correction to covariance matrix: correction matrix calculated with weight-squared is singular" <<endl ;
1271 decomp.Invert(matC);
1274 for (
int i = 0; i < matC.
GetNrows(); ++i)
1275 for (
int j = 0; j < i; ++j) matC(j, i) = matC(i, j);
1289 m.
minos(*minosSet) ;
1298 string title =
Form(
"Result of fit of p.d.f. %s to dataset %s",
GetName(),data.
GetName()) ;
1299 ret = m.
save(name.c_str(),title.c_str()) ;
1331 ret = m.
fit(fitOpt) ;
1362 if (doSumW2==1 && m.
getNPar()>0) {
1365 list<RooNLLVar*> nllComponents ;
1372 nllComponents.push_back(nllComp) ;
1380 for (list<RooNLLVar*>::iterator iter1=nllComponents.begin() ; iter1!=nllComponents.end() ; iter1++) {
1381 (*iter1)->applyWeightSquared(
kTRUE) ;
1383 coutI(
Fitting) <<
"RooAbsPdf::fitTo(" <<
GetName() <<
") Calculating sum-of-weights-squared correction matrix for covariance matrix" << endl ;
1386 for (list<RooNLLVar*>::iterator iter2=nllComponents.begin() ; iter2!=nllComponents.end() ; iter2++) {
1387 (*iter2)->applyWeightSquared(
kFALSE) ;
1394 CholeskyDecompGenDim<Double_t> decomp(matC.
GetNrows(), matC);
1397 <<
") ERROR: Cannot apply sum-of-weights correction to covariance matrix: correction matrix calculated with weight-squared is singular" <<endl ;
1400 decomp.Invert(matC);
1403 for (
int i = 0; i < matC.
GetNrows(); ++i)
1404 for (
int j = 0; j < i; ++j) matC(j, i) = matC(i, j);
1418 m.
minos(*minosSet) ;
1427 string title =
Form(
"Result of fit of p.d.f. %s to dataset %s",
GetName(),data.
GetName()) ;
1428 ret = m.
save(name.c_str(),title.c_str()) ;
1458 RooLinkedList chi2CmdList = pc.
filterCmdList(fitCmdList,
"Range,RangeWithName,NumCPU,Optimize,ProjectedObservables,AddCoefRange,SplitRange,DataError,Extended") ;
1511 if (!rangeName || strchr(rangeName,
',')==0) {
1514 chi2 =
new RooChi2Var(baseName.c_str(),baseName.c_str(),*
this,
data,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) ;
1520 string rcmd =
"RangeWithName" ;
1521 if (arg1.
GetName()==rcmd) rarg = &arg1 ;
1522 if (arg2.
GetName()==rcmd) rarg = &arg2 ;
1523 if (arg3.
GetName()==rcmd) rarg = &arg3 ;
1524 if (arg4.
GetName()==rcmd) rarg = &arg4 ;
1525 if (arg5.
GetName()==rcmd) rarg = &arg5 ;
1526 if (arg6.
GetName()==rcmd) rarg = &arg6 ;
1527 if (arg7.
GetName()==rcmd) rarg = &arg7 ;
1528 if (arg8.
GetName()==rcmd) rarg = &arg8 ;
1532 const size_t bufSize = strlen(rangeName)+1;
1533 char* buf =
new char[bufSize] ;
1534 strlcpy(buf,rangeName,bufSize) ;
1535 char* token = strtok(buf,
",") ;
1540 &arg1==rarg?subRangeCmd:arg1,&arg2==rarg?subRangeCmd:arg2,
1541 &arg3==rarg?subRangeCmd:arg3,&arg4==rarg?subRangeCmd:arg4,
1542 &arg5==rarg?subRangeCmd:arg5,&arg6==rarg?subRangeCmd:arg6,
1543 &arg7==rarg?subRangeCmd:arg7,&arg8==rarg?subRangeCmd:arg8) ;
1544 chi2List.
add(*chi2Comp) ;
1545 token = strtok(0,
",") ;
1567 pc.
defineInt(
"integrate",
"Integrate",0,0) ;
1583 return new RooXYChi2Var(name.c_str(),name.c_str(),*
this,
data,*yvar,integrate) ;
1614 os << indent <<
"--- RooAbsPdf ---" << endl;
1615 os << indent <<
"Cached value = " <<
_value << endl ;
1617 os << indent <<
" Normalization integral: " << endl ;
1618 TString moreIndent(indent) ; moreIndent.Append(
" ") ;
1641 return new RooGenContext(*
this,vars,prototype,auxProto,verbose) ;
1650 if (prototype || (auxProto && auxProto->
getSize()>0)) {
1651 return genContext(vars,prototype,auxProto,verbose);
1760 pc.
defineInt(
"randProto",
"PrototypeData",0,0) ;
1761 pc.
defineInt(
"resampleProto",
"PrototypeData",1,0) ;
1763 pc.
defineInt(
"extended",
"Extended",0,0) ;
1764 pc.
defineInt(
"nEvents",
"NumEvents",0,0) ;
1765 pc.
defineInt(
"autoBinned",
"AutoBinned",0,1) ;
1766 pc.
defineInt(
"expectedData",
"ExpectedData",0,0) ;
1772 pc.
process(arg1,arg2,arg3,arg4,arg5,arg6) ;
1779 const char* dsetName = pc.
getString(
"dsetName") ;
1785 const char* binnedTag = pc.
getString(
"binnedTag") ;
1805 }
else if (nEvents==0) {
1806 cxcoutI(
Generation) <<
"No number of events specified , number of events generated is " 1810 if (extended && protoData && !randProto) {
1811 cxcoutI(
Generation) <<
"WARNING Using generator option Extended() (Poisson distribution of #events) together " 1812 <<
"with a prototype dataset implies incomplete sampling or oversampling of proto data. " 1813 <<
"Set randomize flag in ProtoData() option to randomize prototype dataset order and thus " 1814 <<
"to randomize the set of over/undersampled prototype events for each generation cycle." << endl ;
1821 data =
generate(whatVars,*protoData,
Int_t(nEvents),verbose,randProto,resampleProto) ;
1823 data =
generate(whatVars,nEvents,verbose,autoBinned,binnedTag,expectedData, extended) ;
1827 if (dsetName && strlen(dsetName)>0) {
1892 pc.
defineInt(
"randProto",
"PrototypeData",0,0) ;
1893 pc.
defineInt(
"resampleProto",
"PrototypeData",1,0) ;
1895 pc.
defineInt(
"extended",
"Extended",0,0) ;
1896 pc.
defineInt(
"nEvents",
"NumEvents",0,0) ;
1897 pc.
defineInt(
"autoBinned",
"AutoBinned",0,1) ;
1903 pc.
process(arg1,arg2,arg3,arg4,arg5,arg6) ;
1910 const char* dsetName = pc.
getString(
"dsetName") ;
1917 const char* binnedTag = pc.
getString(
"binnedTag") ;
1921 return new GenSpec(cx,whatVars,protoData,nEvents,extended,randProto,resampleProto,dsetName) ;
1962 return new RooDataSet(
"emptyData",
"emptyData",whatVars) ;
1972 if(0 != context && context->
isValid()) {
1978 if(0 != context)
delete context;
1992 if (nEvents==0 && (prototype==0 || prototype->
numEntries()==0)) {
1993 return new RooDataSet(
"emptyData",
"emptyData",whatVars) ;
1999 if (resampleProto) {
2000 randProtoOrder=
kTRUE ;
2004 coutI(
Generation) <<
"RooAbsPdf::generate (Re)randomizing event order in prototype dataset (Nevt=" << nEvents <<
")" << endl ;
2011 generated= context.
generate(nEvents,skipInit,extended);
2014 coutE(
Generation) <<
"RooAbsPdf::generate(" <<
GetName() <<
") do not have a valid generator context" << endl;
2045 coutE(
Generation) <<
"RooAbsPdf::generate(" <<
GetName() <<
") ERROR creating generator context" << endl ;
2062 for (i=0 ; i<nProto ; i++) {
2070 if (!resampleProto) {
2072 for (i=0 ; i<nProto ; i++) {
2081 for (i=0 ; i<nProto ; i++) {
2145 if(server == &arg)
continue;
2209 pc.
defineInt(
"extended",
"Extended",0,0) ;
2210 pc.
defineInt(
"nEvents",
"NumEvents",0,0) ;
2212 pc.
defineInt(
"expectedData",
"ExpectedData",0,0) ;
2215 pc.
process(arg1,arg2,arg3,arg4,arg5,arg6) ;
2223 nEvents = pc.
getInt(
"nEvents") ;
2228 const char* dsetName = pc.
getString(
"dsetName") ;
2233 cxcoutI(
Generation) <<
" Extended mode active, number of events generated (" << nEvents <<
") is Poisson fluctuation on " 2234 <<
GetName() <<
"::expectedEvents() = " << nEvents << endl ;
2239 }
else if (nEvents==0) {
2240 cxcoutI(
Generation) <<
"No number of events specified , number of events generated is " 2248 if (dsetName && strlen(dsetName)>0) {
2279 coutE(
InputArguments) <<
"RooAbsPdf::generateBinned(" <<
GetName() <<
") ERROR: No event count provided and p.d.f does not provide expected number of events" << endl ;
2285 if (expectedData || extended) {
2298 Int_t histOutSum(0) ;
2307 }
else if (extended) {
2317 if (hist->
weight()>histMax) {
2318 histMax = hist->
weight() ;
2321 histOutSum += histOut[i] ;
2326 if (!expectedData && !extended) {
2331 Int_t nEvtExtra = abs(
Int_t(nEvents)-histOutSum) ;
2335 while(nEvtExtra>0) {
2338 hist->
get(ibinRand) ;
2341 if (ranY<hist->weight()) {
2343 histOut[ibinRand]++ ;
2346 if (histOut[ibinRand]>0) {
2347 histOut[ibinRand]-- ;
2359 hist->
set(histOut[i],
sqrt(1.0*histOut[i])) ;
2362 }
else if (expectedData) {
2385 return generate(whatVars,nEvents) ;
2462 cmdList.
Add(plotRange) ;
2467 cmdList.
Add(normRange2) ;
2470 if (plotRange || normRange2) {
2471 coutI(
Plotting) <<
"RooAbsPdf::plotOn(" <<
GetName() <<
") p.d.f was fitted in range and no explicit " 2472 << (plotRange?
"plot":
"") << ((plotRange&&normRange2)?
",":
"")
2473 << (normRange2?
"norm":
"") <<
" range was specified, using fit range as default" << endl ;
2490 pc.
defineInt(
"rangeAdjustNorm",
"Range",0,0) ;
2491 pc.
defineInt(
"rangeWNAdjustNorm",
"RangeWithName",0,0) ;
2492 pc.
defineMutex(
"SelectCompSet",
"SelectCompSpec") ;
2506 const char* compSpec = pc.
getString(
"compSpec") ;
2508 Bool_t haveCompSel = ( (compSpec && strlen(compSpec)>0) || compSet) ;
2511 TString nameSuffix ;
2512 if (compSpec && strlen(compSpec)>0) {
2513 nameSuffix.Append(
"_Comp[") ;
2514 nameSuffix.Append(compSpec) ;
2515 nameSuffix.Append(
"]") ;
2516 }
else if (compSet) {
2517 nameSuffix.Append(
"_Comp[") ;
2519 nameSuffix.Append(
"]") ;
2523 pc.
stripCmdList(cmdList,
"SelectCompSet,SelectCompSpec") ;
2527 RooCmdArg cnsuffix(
"CurveNameSuffix",0,0,0,0,nameSuffix.Data(),0,0,0) ;
2528 cmdList.
Add(&cnsuffix);
2537 <<
"): ERROR the 'Expected' scale option can only be used on extendable PDFs" << endl ;
2549 list<pair<Double_t,Double_t> > rangeLim ;
2556 rangeLim.push_back(make_pair(rangeLo,rangeHi)) ;
2557 adjustNorm = pc.
getInt(
"rangeAdjustNorm") ;
2558 hasCustomRange =
kTRUE ;
2561 << rangeLo <<
"," << rangeHi <<
"]" ;
2563 ccoutI(
Plotting) <<
", curve is normalized to data in " << (adjustNorm?
"given":
"full") <<
" given range" << endl ;
2568 nameSuffix.Append(
Form(
"_Range[%f_%f]",rangeLo,rangeHi)) ;
2574 char* rangeNameToken = strtok(tmp,
",") ;
2575 while(rangeNameToken) {
2578 rangeLim.push_back(make_pair(rangeLo,rangeHi)) ;
2579 rangeNameToken = strtok(0,
",") ;
2581 adjustNorm = pc.
getInt(
"rangeWNAdjustNorm") ;
2582 hasCustomRange =
kTRUE ;
2586 ccoutI(
Plotting) <<
", curve is normalized to data in " << (adjustNorm?
"given":
"full") <<
" given range" << endl ;
2591 nameSuffix.Append(
Form(
"_Range[%s]",pc.
getString(
"rangeName"))) ;
2597 char* rangeNameToken = strtok(tmp,
",") ;
2599 while(rangeNameToken) {
2602 rangeLim.push_back(make_pair(rangeLo,rangeHi)) ;
2603 rangeNameToken = strtok(0,
",") ;
2605 adjustNorm =
kTRUE ;
2606 hasCustomRange =
kTRUE ;
2607 coutI(
Plotting) <<
"RooAbsPdf::plotOn(" <<
GetName() <<
") p.d.f. curve is normalized using explicit choice of ranges '" << pc.
getString(
"normRangeName",0,
kTRUE) <<
"'" << endl ;
2609 nameSuffix.Append(
Form(
"_NormRange[%s]",pc.
getString(
"rangeName"))) ;
2613 if (hasCustomRange && adjustNorm) {
2616 list<pair<Double_t,Double_t> >::iterator riter = rangeLim.begin() ;
2617 for (;riter!=rangeLim.end() ; ++riter) {
2621 scaleFactor *= rangeNevt/nExpected ;
2627 scaleFactor *= nExpected ;
2629 scaleFactor /= nExpected ;
2651 if (!dynamic_cast<RooAbsReal*>(arg)) {
2652 branchNodeSet.
remove(*arg) ;
2664 if (dirSelNodes->
getSize()>0) {
2665 coutI(
Plotting) <<
"RooAbsPdf::plotOn(" <<
GetName() <<
") directly selected PDF components: " << *dirSelNodes << endl ;
2671 coutE(
Plotting) <<
"RooAbsPdf::plotOn(" <<
GetName() <<
") ERROR: component selection set " << *compSet <<
" does not match any components of p.d.f." << endl ;
2673 coutE(
Plotting) <<
"RooAbsPdf::plotOn(" <<
GetName() <<
") ERROR: component selection expression '" << compSpec <<
"' does not select any components of p.d.f." << endl ;
2678 delete dirSelNodes ;
2682 RooCmdArg cnsuffix(
"CurveNameSuffix",0,0,0,0,nameSuffix.Data(),0,0,0) ;
2683 cmdList.
Add(&cnsuffix);
2726 <<
"): ERROR the 'Expected' scale option can only be used on extendable PDFs" << endl ;
2785 cmdList.
Add(const_cast<RooCmdArg*>(&arg1)) ; cmdList.
Add(const_cast<RooCmdArg*>(&arg2)) ;
2786 cmdList.
Add(const_cast<RooCmdArg*>(&arg3)) ; cmdList.
Add(const_cast<RooCmdArg*>(&arg4)) ;
2787 cmdList.
Add(const_cast<RooCmdArg*>(&arg5)) ; cmdList.
Add(const_cast<RooCmdArg*>(&arg6)) ;
2788 cmdList.
Add(const_cast<RooCmdArg*>(&arg7)) ; cmdList.
Add(const_cast<RooCmdArg*>(&arg8)) ;
2796 pc.
defineInt(
"showc",
"ShowConstants",0,0) ;
2800 pc.
defineInt(
"dummy",
"FormatArgs",0,0) ;
2809 const char* label = pc.
getString(
"label") ;
2816 const char* formatStr = pc.
getString(
"formatStr") ;
2825 paramOn(frame,*params,showc,label,0,0,xmin,xmax,ymax,formatCmd) ;
2827 paramOn(frame,*params,showc,label,sigDigit,formatStr,xmin,xmax,ymax) ;
2835 paramOn(frame,*selParams,showc,label,0,0,xmin,xmax,ymax,formatCmd) ;
2837 paramOn(frame,*selParams,showc,label,sigDigit,formatStr,xmin,xmax,ymax) ;
2857 TString opts(options) ;
2879 TString opts = options;
2881 Bool_t showLabel= (label != 0 && strlen(label) > 0);
2892 if(showLabel)
ymin-= dy;
2907 if(var->
isConstant() && !showConstants)
continue;
2909 TString *formatted= options ? var->
format(sigDigits, options) : var->
format(*formatCmd) ;
2910 box->
AddText(formatted->Data());
2914 if(showLabel) box->
AddText(label);
2977 pdfOwner->
_norm = 0 ;
2993 name.Append(
"_Proj[") ;
3057 pc.
defineInt(
"numScanBins",
"ScanParameters",0,1000) ;
3058 pc.
defineInt(
"intOrder",
"ScanParameters",1,2) ;
3059 pc.
defineInt(
"doScanNum",
"ScanNumCdf",0,1) ;
3060 pc.
defineInt(
"doScanAll",
"ScanAllCdf",0,0) ;
3061 pc.
defineInt(
"doScanNon",
"ScanNoCdf",0,0) ;
3062 pc.
defineMutex(
"ScanNumCdf",
"ScanAllCdf",
"ScanNoCdf") ;
3065 pc.
process(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) ;
3095 coutI(
NumIntegration) <<
"RooAbsPdf::createCdf(" <<
GetName() <<
") integration over observable(s) " << iset <<
" involves numeric integration," << endl
3096 <<
" constructing cdf though numeric integration of sampled pdf in " << numScanBins <<
" bins and applying order " 3097 << intOrder <<
" interpolation on integrated histogram." << endl
3098 <<
" To override this choice of technique use argument ScanNone(), to change scan parameters use ScanParameters(nbins,order) argument" << endl ;
3110 ivar->
setBins(numScanBins,
"numcdf") ;
3221 if (config)
return config ;
3259 delete _genContext ;
3267 _genContext(context), _whatVars(whatVars), _protoData(protoData), _nGen(nGen), _extended(extended),
3268 _randProto(randProto), _resampleProto(resampleProto), _dsetName(dsetName), _init(init)
virtual RooAbsReal * createNLL(RooAbsData &data, const RooLinkedList &cmdList)
Construct representation of -log(L) of PDFwith given dataset.
virtual Double_t getMin(const char *name=0) const
RooArgSet * getVariables(Bool_t stripDisconnected=kTRUE) const
Return RooArgSet with all variables (tree leaf nodes of expresssion tree)
void operModeHook(RooAbsArg::OperMode)
Dummy implementation.
virtual const char * GetName() const
Returns name of object.
void setInterpolationOrder(Int_t order)
Set interpolation order of RooHistFunct representing cache histogram.
TIterator * createIterator(Bool_t dir=kIterForward) const
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.
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.
void SetName(const char *name)
Change the name of this dataset into the given name.
virtual RooFitResult * chi2FitTo(RooDataHist &data, const RooLinkedList &cmdList)
Internal back-end function to steer chi2 fits.
virtual void SetName(const char *name="")
void setPrintEvalErrors(Int_t numEvalErrors)
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)
void optimizeConst(Int_t flag)
If flag is true, perform constant term optimization on function being minimized.
Bool_t dependsOn(const RooAbsCollection &serverList, const RooAbsArg *ignoreArg=0, Bool_t valueOnly=kFALSE) const
Test whether we depend on (ie, are served by) any object in the specified collection.
void setTraceCounter(Int_t value, Bool_t allNodes=kFALSE)
Reset trace counter to given value, limiting the number of future trace messages for this pdf to 'val...
void plotOnCompSelect(RooArgSet *selNodes) const
Helper function for plotting of composite p.d.fs.
void applyCovarianceMatrix(TMatrixDSym &V)
Apply results of given external covariance matrix.
virtual RooAbsReal * createChi2(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())
Create a chi-2 from a histogram and this function.
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
virtual const RooArgSet * get() const
virtual Bool_t Remove(TObject *arg)
Remove object from collection.
virtual RooDataHist * generateBinned(const RooArgSet &whatVars, Double_t nEvents, const RooCmdArg &arg1, const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none())
Generate a new dataset containing the specified variables with events sampled from our distribution...
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...
void addObject(TObject *obj, Option_t *drawOptions="", Bool_t invisible=kFALSE)
Add a generic object to this plot.
virtual void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Print multi line detailed information of this RooAbsPdf.
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'.
Class RooNumCdf is an implementation of RooNumRunningInt specialized to calculate cumulative distribu...
Double_t getVal(const RooArgSet *set=0) const
virtual ~RooAbsPdf()
Destructor.
virtual Bool_t selfNormalized() const
void setGeneratorConfig()
Remove the specialized numeric MC generator configuration associated with this object.
const TMatrixDSym & covarianceMatrix() const
Return covariance matrix.
static const char * str(const TNamed *ptr)
Return C++ string corresponding to given TNamed pointer.
TString _normRange
MC generator configuration specific for this object.
Normalization set with for above integral.
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...
virtual TText * AddText(Double_t x1, Double_t y1, const char *label)
Add a new Text line to this pavetext at given coordinates.
Int_t minos()
Execute MINOS.
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 ...
virtual void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Structure printing.
void setNormRange(const char *rangeName)
void setNameList(const char *givenList)
RooCmdArg NumEvents(Int_t numEvents)
void updateNormVars(const RooArgSet &vars)
Install the given set of observables are reference normalization variables for this frame...
static UInt_t integer(UInt_t max, TRandom *generator=randomGenerator())
Return an integer uniformly distributed from [0,n-1].
Int_t * randomizeProtoOrder(Int_t nProto, Int_t nGen, Bool_t resample=kFALSE) const
Return lookup table with randomized access order for prototype events, given nProto prototype data ev...
virtual Double_t getLogVal(const RooArgSet *set=0) const
Return the log of the current value with given normalization An error message is printed if the argum...
RooInt is a minimal implementation of a TObject holding a Int_t value.
RooNumGenConfig * _specGeneratorConfig
friend class RooProjectedPdf
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.
GenSpec * prepareMultiGen(const RooArgSet &whatVars, const RooCmdArg &arg1=RooCmdArg::none(), const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none())
Prepare GenSpec configuration object for efficient generation of multiple datasets from idetical spec...
void allowUndefined(Bool_t flag=kTRUE)
void setProxyNormSet(const RooArgSet *nset)
Forward a change in the cached normalization argset to all the registered proxies.
Bool_t addOwnedComponents(const RooArgSet &comps)
Take ownership of the contents of 'comps'.
virtual RooPlot * plotOn(RooPlot *frame, const RooCmdArg &arg1=RooCmdArg::none(), const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none(), const RooCmdArg &arg9=RooCmdArg::none(), const RooCmdArg &arg10=RooCmdArg::none()) const
Plot (project) PDF on specified frame.
Int_t migrad()
Execute MIGRAD.
void setStrategy(Int_t strat)
Change MINUIT strategy to istrat.
TObject * getObject(const char *name, TObject *obj=0)
Return TObject property registered with name 'name'.
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
RooCmdArg SupNormSet(const RooArgSet &nset)
static TString _normRangeOverride
static int verboseEval()
Return global level of verbosity for p.d.f. evaluations.
Iterator abstract base class.
header file containing the templated implementation of matrix inversion routines for use with ROOT's ...
void setMinimizerType(const char *type)
Choose the minimzer algorithm.
Double_t analyticalIntegralWN(Int_t code, const RooArgSet *normSet, const char *rangeName=0) const
Analytical integral with normalization (see RooAbsReal::analyticalIntegralWN() for further informatio...
Double_t getFitRangeBinW() const
void setStrategy(Int_t strat)
Change MINUIT strategy to istrat.
void setEvalErrorWall(Bool_t flag)
RooAbsArg * findServer(const char *name) const
RooAbsGenContext * _genContext
RooAbsReal * createCdf(const RooArgSet &iset, const RooArgSet &nset=RooArgSet())
Create a cumulative distribution function of this p.d.f in terms of the observables listed in iset...
RooAbsReal * createScanCdf(const RooArgSet &iset, const RooArgSet &nset, Int_t numScanBins, Int_t intOrder)
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.
RooAbsReal * createIntRI(const RooArgSet &iset, const RooArgSet &nset=RooArgSet())
Utility function for createRunningIntegral that construct an object implementing the standard (analyt...
RooCmdArg Range(const char *rangeName, Bool_t adjustNorm=kTRUE)
void setVerbose(Bool_t flag=kTRUE)
Bool_t traceEvalPdf(Double_t value) const
Check that passed value is positive and not 'not-a-number'.
static void setEvalErrorLoggingMode(ErrorLoggingMode m)
Set evaluation error logging mode.
void clearValueAndShapeDirty() const
RooDataSet is a container class to hold N-dimensional binned data.
RooRealIntegral performs hybrid numerical/analytical integrals of RooAbsReal objects The class perfor...
void applyCovarianceMatrix(TMatrixDSym &V)
Apply results of given external covariance matrix.
RooAbsPdf()
Default constructor.
The TNamed class is the base class for all named ROOT classes.
RooNumGenConfig * specialGeneratorConfig() const
Returns the specialized integrator configuration for this RooAbsReal.
T * getObj(const RooArgSet *nset, Int_t *sterileIndex=0, const TNamed *isetRangeName=0)
RooConstraintSum calculates the sum of the -(log) likelihoods of a set of RooAbsPfs that represent co...
Int_t setPrintLevel(Int_t newLevel)
Change the MINUIT internal printing level.
virtual RooArgSet * getConstraints(const RooArgSet &, RooArgSet &, Bool_t) const
virtual void Print(Option_t *options=0) const
Print TNamed name and title.
virtual UInt_t Integer(UInt_t imax)
Returns a random integer on [ 0, imax-1 ].
RooAbsCollection * selectByAttrib(const char *name, Bool_t value) const
Create a subset of the current collection, consisting only of those elements with the specified attri...
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...
static TRandom * randomGenerator()
Return a pointer to a singleton random-number generator implementation.
virtual Double_t weight() const
const RooArgSet * getNormVars() const
virtual void Print(Option_t *options=0) const
This method must be overridden when a class wants to print itself.
void setBins(Int_t nBins, const char *name=0)
virtual RooAbsPdf * createProjection(const RooArgSet &iset)
Return a p.d.f that represent a projection of this p.d.f integrated over given observables.
RooAbsGenContext is the abstract base class for generator contexts of RooAbsPdf objects.
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 RooAbsGenContext * binnedGenContext(const RooArgSet &vars, Bool_t verbose=kFALSE) const
Return a binned generator context.
static void clearEvalError()
Clear the evaluation error flag.
virtual Bool_t syncNormalization(const RooArgSet *dset, Bool_t adjustProxies=kTRUE) const
Verify that the normalization integral cached with this PDF is valid for given set of normalization o...
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 void enableOffsetting(Bool_t)
void stripCmdList(RooLinkedList &cmdList, const char *cmdsToPurge)
Utility function that strips command names listed (comma separated) in cmdsToPurge from cmdList...
virtual void SetTextAlign(Short_t align=11)
Set the text alignment.
RooRealVar represents a fundamental (non-derived) real valued object.
const RooArgSet & numIntRealVars() const
void SetName(const char *name)
Change the name of the RooDataHist.
virtual Double_t getValV(const RooArgSet *set=0) const
Return current value, normalizated by integrating over the observables in 'nset'. ...
Bool_t getAttribute(const Text_t *name) const
Check if a named attribute is set. By default, all attributes are unset.
virtual void Add(TObject *arg)
RooNameSet is a utility class that stores the names the objects in a RooArget.
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 ...
Class RooNLLVar implements a a -log(likelihood) calculation from a dataset and a PDF.
VecExpr< UnaryOp< Fabs< T >, VecExpr< A, T, D >, T >, T, D > fabs(const VecExpr< A, T, D > &rhs)
virtual void setExpectedData(Bool_t)
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'.
static RooNumGenConfig & defaultConfig()
Return reference to instance of default numeric integrator configuration object.
std::string contentsString() const
Return comma separated list of contained object names as STL string.
static Int_t _verboseEval
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
RooAbsArg * first() const
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 Bool_t isNonPoissonWeighted() const
TObject * At(Int_t index) const
Return object stored in sequential position given by index.
void setNormRangeOverride(const char *rangeName)
virtual void generateEvent(Int_t code)
Interface for generation of anan event using the algorithm corresponding to the specified code...
RooObjCacheManager _normMgr
void setProfile(Bool_t flag=kTRUE)
Bool_t ok(Bool_t verbose) const
Return true of parsing was successful.
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...
static void raiseEvalError()
Raise the evaluation error flag.
const Text_t * getStringAttribute(const Text_t *key) const
Get string attribute mapped under key 'key'.
char * Form(const char *fmt,...)
RooCachedReal is an implementation of RooAbsCachedReal that can cache any external RooAbsReal input f...
Double_t getNorm(const RooArgSet &nset) const
TString * format(const RooCmdArg &formatArg) const
Format contents of RooRealVar for pretty printing on RooPlot parameter boxes.
OperMode operMode() const
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)
virtual void resetErrorCounters(Int_t resetValue=10)
Reset error counter to given value, limiting the number of future error messages for this pdf to 'res...
RooDataSet is a container class to hold unbinned data.
virtual RooAbsGenContext * autoGenContext(const RooArgSet &vars, const RooDataSet *prototype=0, const RooArgSet *auxProto=0, Bool_t verbose=kFALSE, Bool_t autoBinned=kTRUE, const char *binnedTag="") const
Bool_t canBeExtended() const
TIterator * serverIterator() const
class to compute the Cholesky decomposition of a matrix
Class RooGenContext implement a universal generator context for all RooAbsPdf classes that do not hav...
virtual const RooAbsReal * getNormObj(const RooArgSet *set, const RooArgSet *iset, const TNamed *rangeName=0) const
Return pointer to RooAbsReal object that implements calculation of integral over observables iset in ...
A RooPlot is a plot frame and a container for graphics objects within that frame. ...
virtual Bool_t isDirectGenSafe(const RooAbsArg &arg) const
Check if given observable can be safely generated using the pdfs internal generator mechanism (if tha...
const RooNumGenConfig * getGeneratorConfig() const
Return the numeric MC generator configuration used for this object.
virtual ExtendMode extendMode() const
RooLinkedList is an collection class for internal use, storing a collection of RooAbsArg pointers in ...
virtual Bool_t isBinnedDistribution(const RooArgSet &) const
RooArgSet * getSet(const char *name, RooArgSet *set=0)
Return RooArgSet property registered with name 'name'.
virtual Double_t sumEntries() const
void setInt(Int_t idx, Int_t value)
A Pave (see TPave) with text, lines or/and boxes inside.
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...
void setEvalErrorWall(Bool_t flag)
RooAbsArg * find(const char *name) const
Find object with given name in list.
virtual Int_t numEntries() const
Return the number of bins.
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
virtual Int_t getGenerator(const RooArgSet &directVars, RooArgSet &generateVars, Bool_t staticInitOK=kTRUE) const
Load generatedVars with the subset of directVars that we can generate events for, and return a code t...
RooFitResult * save(const char *name=0, const char *title=0)
Save and return a RooFitResult snaphot of current minimizer status.
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...
virtual RooAbsGenContext * genContext(const RooArgSet &vars, const RooDataSet *prototype=0, const RooArgSet *auxProto=0, Bool_t verbose=kFALSE) const
Interface function to create a generator context from a p.d.f.
Double_t getDouble(const char *name, Double_t defaultValue=0)
Return Double_t property registered with name 'name'.
static RooNumGenConfig * defaultGeneratorConfig()
Returns the default numeric MC generator configuration for all RooAbsReals.
virtual Bool_t traceEvalHook(Double_t value) const
WVE 08/21/01 Probably obsolete now.
RooCmdArg Normalization(Double_t scaleFactor)
virtual void setProtoDataOrder(Int_t *lut)
Set the traversal order of prototype data to that in the lookup tables passed as argument.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
TMatrixTSym< Element > & Similarity(const TMatrixT< Element > &n)
Calculate B * (*this) * B^T , final matrix will be (nrowsb x nrowsb) This is a similarity transform w...
RooCmdArg NormRange(const char *rangeNameList)
virtual Double_t Uniform(Double_t x1=1)
Returns a uniform deviate on the interval (0, x1).
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)
virtual RooDataSet * generate(Double_t nEvents=0, Bool_t skipInit=kFALSE, Bool_t extendedMode=kFALSE)
Generate the specified number of events with nEvents>0 and and return a dataset containing the genera...
Bool_t isValueDirty() const
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.
virtual Bool_t remove(const RooAbsArg &var, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE)
Remove the specified argument from our list.
Int_t hesse()
Execute HESSE.
Bool_t hasProcessed(const char *cmdName) const
Return true if RooCmdArg with name 'cmdName' has been processed.
virtual RooPlot * paramOn(RooPlot *frame, const RooCmdArg &arg1=RooCmdArg::none(), const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none())
Add a box with parameter values (and errors) to the specified frame.
RooFitResult * fit(const char *options)
Parse traditional RooAbsPdf::fitTo driver options.
void setProfile(Bool_t flag=kTRUE)
virtual void printValue(std::ostream &os) const
Print value of p.d.f, also print normalization integral that was last used, if any.
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. ...
RooFitResult * chi2FitDriver(RooAbsReal &fcn, RooLinkedList &cmdList)
Internal driver function for chi2 fits.
RooAbsRealLValue * getPlotVar() const
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 void constOptimizeTestStatistic(ConstOpCode opcode, Bool_t doAlsoTrackingOpt=kTRUE)
Interface function signaling a request to perform constant term optimization.
RooDataSet * generate(const RooArgSet &whatVars, Int_t nEvents, const RooCmdArg &arg1, const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none())
Generate a new dataset containing the specified variables with events sampled from our distribution...
static Bool_t evalError()
Return the evaluation error flag.
virtual void initGenerator(Int_t code)
Interface for one-time initialization to setup the generator for the specified code.
virtual TObject * Next()=0
virtual RooArgSet * getAllConstraints(const RooArgSet &observables, RooArgSet &constrainedParams, Bool_t stripDisconnected=kTRUE) const
This helper function finds and collects all constraints terms of all coponent p.d.f.s and returns a RooArgSet with all those terms.
void setOperMode(OperMode mode, Bool_t recurseADirty=kTRUE)
Change cache operation mode to given mode.
Double_t getFitRangeNEvt() const
virtual RooFitResult * fitTo(RooAbsData &data, const RooCmdArg &arg1=RooCmdArg::none(), const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none())
Fit PDF to given dataset.
RooNumGenConfig holds the configuration parameters of the various numeric integrators used by RooReal...
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 ...
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.
RooArgSet * _normSet
Normalization integral (owned by _normMgr)
Int_t setObj(const RooArgSet *nset, T *obj, const TNamed *isetRangeName=0)
RooAddition calculates the sum of a set of RooAbsReal terms, or when constructed with two sets...
virtual Int_t Poisson(Double_t mean)
Generates a random integer N according to a Poisson law.
virtual void SetTextSize(Float_t tsize=1)
Set the text size.
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 ~CacheElem()
Destructor of normalization cache element.
RooFitResult * fit(const char *options)
Parse traditional RooAbsPdf::fitTo driver options.
virtual RooDataSet * generateSimGlobal(const RooArgSet &whatVars, Int_t nEvents)
Special generator interface for generation of 'global observables' – for RooStats tools...
RooLinkedList filterCmdList(RooLinkedList &cmdInList, const char *cmdNameList, Bool_t removeFromInList=kTRUE)
Utility function to filter commands listed in cmdNameList from cmdInList.
double norm(double *x, double *p)
Bool_t plotSanityChecks(RooPlot *frame) const
Utility function for plotOn(), perform general sanity check on frame to ensure safe plotting operatio...
virtual Double_t extendedTerm(Double_t observedEvents, const RooArgSet *nset=0) const
Returned the extended likelihood term (Nexpect - Nobserved*log(NExpected) of this PDF for the given n...
Bool_t isConstant() const
virtual void SetBorderSize(Int_t bordersize=4)
virtual Int_t numEntries() const
virtual const char * GetTitle() const
Returns title of object.
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.
RooBinnedGenContext is an efficient implementation of the generator context specific for binned pdfs...