48#ifdef ROOFIT_LEGACY_EVAL_BACKEND
52#ifdef ROOFIT_MULTIPROCESS
57using RooFit::Detail::RooNLLVarNew;
63#ifdef ROOFIT_LEGACY_EVAL_BACKEND
68 <<
"The legacy evaluation backend is deprecated and will be removed in ROOT 6.44.\n"
69 "Please use the default \"cpu\" evaluation backend instead, i.e., don't pass RooFit::EvalBackend(\"legacy\")\n"
70 "or RooFit::BatchMode(\"off\") anymore. If the default backend does not work for your use case, please\n"
71 "report it by opening an issue on the ROOT GitHub repository."
99 <<
"RooAbsPdf::fitTo(" << pdf.
GetName()
100 <<
") WARNING: Asymptotic error correction is requested for a binned data set. "
101 "This method is not designed to handle binned data. A standard chi2 fit will likely be more suitable.";
105 std::unique_ptr<RooFitResult>
rw(minimizer.
save());
109 <<
"RooAbsPdf::fitTo(" << pdf.
GetName()
110 <<
") Calculating covariance matrix according to the asymptotically correct approach. If you find this "
111 "method useful please consider citing https://arxiv.org/abs/1911.01303.\n";
123 std::vector<std::unique_ptr<RooDerivative>>
derivatives;
129 const double eps = 1.0e-4;
143 for (std::size_t k = 0; k <
floated.size(); k++) {
160 for (
int j = 0;
j <
data.numEntries();
j++) {
165 for (std::size_t k = 0; k <
floated.size(); k++) {
176 for (std::size_t k = 0; k <
floated.size(); k++) {
177 for (std::size_t
l = 0;
l <
floated.size();
l++) {
182 num.Similarity(
matV);
190 return rw->covQual();
208 std::unique_ptr<RooFitResult>
rw{minimizer.
save()};
209 nll.applyWeightSquared(
true);
211 <<
") Calculating sum-of-weights-squared correction matrix for covariance matrix\n";
213 std::unique_ptr<RooFitResult>
rw2{minimizer.
save()};
214 nll.applyWeightSquared(
false);
222 <<
") ERROR: Cannot apply sum-of-weights correction to covariance matrix: correction "
223 "matrix calculated with weight-squared is singular\n";
231 for (
int i = 0; i <
matC.GetNrows(); ++i) {
232 for (
int j = 0;
j < i; ++
j) {
241 return std::min(
rw->covQual(),
rw2->covQual());
247 double recoverFromNaN = 10.;
264 bool enableParallelGradient =
false;
265 bool enableParallelDescent =
false;
268 bool timingAnalysis =
false;
271 std::string
minAlg =
"minuit";
284 oocoutW(&arg, Fitting) <<
"The NumCPU() option is ignored by the CUDA evaluation backend." << std::endl;
288 oocoutW(&arg, Fitting) <<
"The NumCPU() option has no effect with EvalBackend(\"codegen_no_grad\"), "
289 "because the test statistic is evaluated with single-threaded generated code."
294 oocxcoutI(&arg, Fitting) <<
"NumCPU(" <<
numCpu <<
") enables multi-threaded evaluation of large batches "
295 <<
"for test statistic values. The generated gradient code is not affected."
299 oocxcoutI(&arg, Fitting) <<
"NumCPU(" <<
numCpu <<
") enables multi-threaded evaluation of large batches in "
300 <<
"the RooBatchCompute library. The interleaving strategy argument of NumCPU() is "
301 <<
"ignored." << std::endl;
312 <<
"p.d.f. provides expected number of events, including extended term in likelihood." << std::endl;
323 std::string
errMsg =
"You used the Extended(false) option on a pdf where the fit MUST be extended! "
324 "The parameters are not well defined and you're getting nonsensical results.";
362 auto &observable =
static_cast<RooRealVar &
>(*arg);
365 observable.getMax(
subrange.c_str()));
376template <
typename TermFactory>
400 std::unique_ptr<RooArgSet> observables{
408 combined->addOwnedComponents(std::move(terms));
417 RooNLLVarNew::Config cfg;
418 cfg.statistic = RooNLLVarNew::Statistic::Chi2;
420 cfg.chi2ErrorType = etype;
422 return std::make_unique<RooNLLVarNew>(
name.c_str(),
name.c_str(),
channelPdf, observables, cfg);
425 chi2->setAttribute(
"Chi2EvaluationActive");
434 RooNLLVarNew::Config cfg;
439 return std::make_unique<RooNLLVarNew>(
name.c_str(),
name.c_str(),
channelPdf, observables, cfg);
456 simPdf->wrapPdfsInBinSamplingPdfs(
data, precision);
486 _pdf->setAttribute(
"SplitRange",
false);
487 _pdf->setStringAttribute(
"RangeName",
nullptr);
508 ctx.setLikelihoodMode(likelihoodMode);
530 observables.
remove(projDeps,
true,
true);
533 <<
") fixing normalization set for coefficient determination to observables in data"
549 RooNLLVarNew::Config cfg;
550 cfg.extended = isExtended;
552 nllTerms.addOwned(std::make_unique<RooNLLVarNew>(
"RooNLLVarNew",
"RooNLLVarNew",
finalPdf, observables, cfg));
555 nllTerms.addOwned(std::move(constraints));
568namespace RooFit::FitHelpers {
596 pc.
defineInt(
"parallelDescentSplitStrategy",
"ParallelDescentOptions", 2,
618 cfg.recoverFromNaN = pc.
getDouble(
"RecoverFromUndefinedRegions");
619 cfg.verbose = pc.
getInt(
"verbose");
620 cfg.doSave = pc.
getInt(
"doSave");
621 cfg.doTimer = pc.
getInt(
"doTimer");
622 cfg.printLevel = pc.
getInt(
"printLevel");
623 cfg.strategy = pc.
getInt(
"strategy");
624 cfg.initHesse = pc.
getInt(
"initHesse");
625 cfg.hesse = pc.
getInt(
"hesse");
626 cfg.minos = pc.
getInt(
"minos");
627 cfg.numee = pc.
getInt(
"numee");
628 cfg.doEEWall = pc.
getInt(
"doEEWall");
629 cfg.doWarn = pc.
getInt(
"doWarn");
630 cfg.doSumW2 = pc.
getInt(
"doSumW2");
631 cfg.doAsymptotic = pc.
getInt(
"doAsymptoticError");
632 cfg.maxCalls = pc.
getInt(
"maxCalls");
633 cfg.minosSet = pc.
getSet(
"minosSet");
634 cfg.minType = pc.
getString(
"mintype",
"");
635 cfg.minAlg = pc.
getString(
"minalg",
"minuit");
636 cfg.doOffset = pc.
getInt(
"doOffset");
637 cfg.parallelize = pc.
getInt(
"parallelize");
638 cfg.enableParallelGradient = pc.
getInt(
"enableParallelGradient");
639 cfg.enableParallelDescent = pc.
getInt(
"enableParallelDescent");
640 cfg.parallelDescentNumSplits = pc.
getInt(
"parallelDescentNumSplits");
641 cfg.parallelDescentSplitStrategy = pc.
getInt(
"parallelDescentSplitStrategy");
642 cfg.timingAnalysis = pc.
getInt(
"timingAnalysis");
649 const bool isChi2 =
nll.getAttribute(
"Chi2EvaluationActive");
651 std::string
msgPrefix = std::string{
"RooAbsPdf::fitTo("} + pdf.
GetName() +
"): ";
656 R
"(WARNING: a likelihood fit is requested of what appears to be weighted data.
657 While the estimated values of the parameters will always be calculated taking the weights into account,
658 there are multiple ways to estimate the errors of the parameters. You are advised to make an
659 explicit choice for the error calculation:
660 - Either provide SumW2Error(true), to calculate a sum-of-weights-corrected HESSE error matrix
661 (error will be proportional to the number of events in MC).
662 - Or provide SumW2Error(false), to return errors from original HESSE error matrix
663 (which will be proportional to the sum of the weights, i.e., a dataset with <sum of weights> events).
664 - Or provide AsymptoticError(true), to use the asymptotically correct expression
665 (for details see https://arxiv.org/abs/1911.01303)."
669 if (cfg.minos && (cfg.doSumW2 == 1 || cfg.doAsymptotic == 1)) {
672 <<
" sum-of-weights and asymptotic error correction do not work with MINOS errors. Not fitting.\n";
675 if (cfg.doAsymptotic == 1 && cfg.minos) {
676 oocoutW(&pdf, InputArguments) <<
msgPrefix <<
"WARNING: asymptotic correction does not apply to MINOS errors\n";
680 if (cfg.doSumW2 == 1 && cfg.doAsymptotic == 1) {
682 <<
"ERROR: Cannot compute both asymptotically correct and SumW2 errors.\n";
689 if (cfg.parallelDescentNumSplits > 0) {
690#ifdef ROOFIT_MULTIPROCESS
691 if (cfg.parallelDescentSplitStrategy == 0) {
697 oocoutW(&pdf, InputArguments) <<
"Likelihood-splitting settings passed via ParallelDescentOptions() are "
698 "ignored, because ROOT was built without RooFit::MultiProcess support"
712 m.setMinimizerType(cfg.minType);
713 m.setEvalErrorWall(cfg.doEEWall);
714 m.setRecoverFromNaNStrength(cfg.recoverFromNaN);
715 m.setPrintEvalErrors(cfg.numee);
716 if (cfg.maxCalls > 0)
717 m.setMaxFunctionCalls(cfg.maxCalls);
718 if (cfg.printLevel != 1)
719 m.setPrintLevel(cfg.printLevel);
724 if (cfg.strategy != 1)
725 m.setStrategy(cfg.strategy);
728 m.minimize(cfg.minType.c_str(), cfg.minAlg.c_str());
734 if (!
isChi2 &&
m.getNPar() > 0) {
735 if (cfg.doAsymptotic == 1)
737 if (cfg.doSumW2 == 1)
742 cfg.minosSet ?
m.minos(*cfg.minosSet) :
m.minos();
745 std::unique_ptr<RooFitResult>
ret;
747 auto name = std::string(
"fitresult_") + pdf.
GetName() +
"_" +
data.GetName();
748 auto title = std::string(
"Result of fit of p.d.f. ") + pdf.
GetName() +
" to dataset " +
data.GetName();
749 ret = std::unique_ptr<RooFitResult>{
m.save(
name.c_str(), title.c_str())};
750 if ((cfg.doSumW2 == 1 || cfg.doAsymptotic == 1) &&
m.getNPar() > 0)
759 auto timingScope = std::make_unique<ROOT::Math::Util::TimingScope>(
760 [&pdf](std::string
const &
msg) {
oocoutI(&pdf, Fitting) <<
msg << std::endl; },
"Creation of NLL object took");
767 pc.
defineString(
"rangeName",
"RangeWithName", 0,
"",
true);
769 pc.
defineString(
"globstag",
"GlobalObservablesTag", 0,
"");
770 pc.
defineString(
"globssource",
"GlobalObservablesSource", 0,
"data");
773 pc.
defineInt(
"splitRange",
"SplitRange", 0, 0);
776 pc.
defineInt(
"interleave",
"NumCPU", 1, 0);
777 pc.
defineInt(
"verbose",
"Verbose", 0, 0);
778 pc.
defineInt(
"cloneData",
"CloneData", 0, 0);
779 pc.
defineSet(
"projDepSet",
"ProjectedObservables", 0,
nullptr);
780 pc.
defineSet(
"cPars",
"Constrain", 0,
nullptr);
781 pc.
defineSet(
"glObs",
"GlobalObservables", 0,
nullptr);
782 pc.
defineInt(
"doOffset",
"OffsetLikelihood", 0, 0);
783 pc.
defineSet(
"extCons",
"ExternalConstraints", 0,
nullptr);
785 pc.
defineDouble(
"IntegrateBins",
"IntegrateBins", 0, -1.);
787 pc.
defineMutex(
"GlobalObservables",
"GlobalObservablesTag");
788 pc.
defineInt(
"ModularL",
"ModularL", 0, 0);
803 if (pc.
getInt(
"ModularL")) {
804 int lut[3] = {2, 1, 0};
824 builder.Extended(
ext)
828 .GlobalObservablesTag(
rangeName.c_str());
830 return std::make_unique<RooFit::TestStatistics::RooRealL>(
"likelihood",
"", builder.build());
843 double rangeLo = pc.
getDouble(
"rangeLo");
844 double rangeHi = pc.
getDouble(
"rangeHi");
851 rrv->setRange(
"fit", rangeLo, rangeHi);
869 std::string
errMsg =
"RooAbsPdf::fitTo: GlobalObservablesSource can only be \"data\" or \"model\"!";
871 throw std::invalid_argument(
errMsg);
878 auto createConstr = [&]() -> std::unique_ptr<RooAbsReal> {
899 for (
auto i : projDeps) {
900 auto res =
normSet.find(i->GetName());
901 if (res !=
nullptr) {
902 res->setAttribute(
"__conditional__");
909 std::unique_ptr<RooAbsPdf>
pdfClone =
914 <<
") fixing interpretation of coefficients of any component to range "
925 pc.getDouble(
"IntegrateBins"),
offset);
930 oocoutI(&pdf, Fitting) <<
"[FitHelpers] Detected correction term from RooAbsPdf::getCorrection(). "
931 <<
"Adding penalty to NLL." << std::endl;
935 "Penalty term from getCorrection()",
correction);
938 auto correctedNLL = std::make_unique<RooAddition>((
baseName +
"_corrected").c_str(),
"NLL + penalty",
948 auto nllWrapper = std::make_unique<RooFit::Experimental::RooEvaluatorWrapper>(
961 nllWrapper->setUseGeneratedFunctionCode(
true);
964 nllWrapper->addOwnedComponents(std::move(nll));
970 std::unique_ptr<RooAbsReal>
nll;
972#ifdef ROOFIT_LEGACY_EVAL_BACKEND
981 oocoutW(&pdf, Minimization) <<
"Cannot use a NumCpu Strategy = 3 when the pdf is not a RooSimultaneous, "
982 "falling back to default strategy = 0"
993 RooAbsTestStatistic::Configuration cfg;
998 cfg.splitCutRange =
static_cast<bool>(
splitRange);
999 cfg.cloneInputData =
static_cast<bool>(
cloneData);
1000 cfg.integrateOverBinsPrecision = pc.
getDouble(
"IntegrateBins");
1004 auto nllVar = std::make_unique<RooNLLVar>(
baseName.c_str(),
"-log(likelihood)",
actualPdf,
data, projDeps,
ext, cfg);
1006 nll = std::move(nllVar);
1010 if (std::unique_ptr<RooAbsReal> constraintTerm =
createConstr()) {
1022 constraintTerm->setData(
data,
false);
1028 auto orignll = std::move(nll);
1029 nll = std::make_unique<RooAddition>((
baseName +
"_with_constr").c_str(),
"nllWithCons",
1031 nll->addOwnedComponents(std::move(
orignll), std::move(constraintTerm));
1035 nll->enableOffsetting(
true);
1039 oocoutI(&pdf, Fitting) <<
"[FitHelpers] Detected correction term from RooAbsPdf::getCorrection(). "
1040 <<
"Adding penalty to NLL." << std::endl;
1044 "Penalty term from getCorrection()",
correction);
1055 throw std::runtime_error(
"RooFit was not built with the legacy evaluation backend");
1067 pc.
defineInt(
"verbose",
"Verbose", 0, 0);
1068 pc.
defineString(
"rangeName",
"RangeWithName", 0,
"",
true);
1074 pc.
defineInt(
"splitRange",
"SplitRange", 0, 0);
1075 pc.
defineDouble(
"integrate_bins",
"IntegrateBins", 0, -1);
1076 pc.
defineString(
"addCoefRange",
"SumCoefRange", 0,
"");
1085 real.removeStringAttribute(
"fitrange");
1087 std::string
baseName =
"chi2_" + std::string(
real.GetName()) +
"_" +
data.GetName();
1102 const double rangeLo = pc.
getDouble(
"rangeLo");
1103 const double rangeHi = pc.
getDouble(
"rangeHi");
1105 real.getObservables(
data.get(), obs);
1108 rrv->setRange(
"fit", rangeLo, rangeHi);
1120 std::unique_ptr<RooFit::Experimental::RooEvaluatorWrapper>
wrapper;
1128 real.getObservables(
data.get(), observables);
1129 RooNLLVarNew::Config cfg;
1130 cfg.statistic = RooNLLVarNew::Statistic::Chi2;
1131 cfg.chi2ErrorType = etype;
1133 wrapper = std::make_unique<RooFit::Experimental::RooEvaluatorWrapper>(
1145 <<
") fixing normalization set for coefficient determination to observables in data\n";
1148 std::unique_ptr<RooAbsPdf>
pdfClone =
1156 std::unique_ptr<RooAbsReal>
chi2;
1166 RooNLLVarNew::Config cfg;
1167 cfg.statistic = RooNLLVarNew::Statistic::Chi2;
1169 cfg.chi2ErrorType = etype;
1173 wrapper = std::make_unique<RooFit::Experimental::RooEvaluatorWrapper>(
1185 wrapper->setUseGeneratedFunctionCode(
true);
1192#ifdef ROOFIT_LEGACY_EVAL_BACKEND
1195 RooAbsTestStatistic::Configuration cfg;
1211 cfg.nCPU = pc.
getInt(
"numcpu");
1213 cfg.verbose =
static_cast<bool>(pc.
getInt(
"verbose"));
1214 cfg.cloneInputData =
false;
1215 cfg.integrateOverBinsPrecision = pc.
getDouble(
"integrate_bins");
1217 cfg.splitCutRange =
static_cast<bool>(
splitRange);
1225 throw std::runtime_error(
"createChi2() is not supported without the legacy evaluation backend");
1247 return arg && arg->getInt(0) != 0;
1254 "RangeWithName,SumCoefRange,NumCPU,SplitRange,Constrained,Constrain,ExternalConstraints,"
1255 "CloneData,GlobalObservables,GlobalObservablesSource,GlobalObservablesTag,"
1256 "EvalBackend,IntegrateBins,ModularL";
1263 "AddCoefRange,SplitRange,DataError,Extended,EvalBackend";
1280 if (pc.
getInt(
"timingAnalysis") && !
real.InheritsFrom(
"RooSimultaneous")) {
1281 oocoutW(&
real, Minimization) <<
"The timingAnalysis feature was built for minimization with RooSimultaneous "
1282 "and is not implemented for other PDF's. Please create a RooSimultaneous to "
1283 "enable this feature."
1291 size_t nEvents =
static_cast<size_t>(
prefit *
data.numEntries());
1292 if (
prefit > 0.5 || nEvents < 100) {
1293 oocoutW(&
real, InputArguments) <<
"PrefitDataFraction should be in suitable range."
1294 <<
"With the current PrefitDataFraction=" <<
prefit
1295 <<
", the number of events would be " << nEvents <<
" out of "
1296 <<
data.numEntries() <<
". Skipping prefit..." << std::endl;
1298 size_t step =
data.numEntries() / nEvents;
1302 for (
int i = 0; i <
data.numEntries(); i += step) {
1325 std::unique_ptr<RooAbsReal>
nll;
1335 oocoutE(&
real, InputArguments) <<
"RooFit::FitHelpers::fitTo(" <<
real.GetName()
1336 <<
") could not create the test statistic, no fit performed" << std::endl;
1340 return RooFit::FitHelpers::minimize(
real, *nll,
data, pc);
header file containing the templated implementation of matrix inversion routines for use with ROOT's ...
ROOT::RRangeCast< T, true, Range_t > dynamic_range_cast(Range_t &&coll)
ROOT::RRangeCast< T, false, Range_t > static_range_cast(Range_t &&coll)
int Int_t
Signed integer 4 bytes (int)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h offset
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t child
class to compute the Cholesky decomposition of a matrix
Common abstract base class for objects that represent a value and a "shape" in RooFit.
virtual bool isCategory() const
void setStringAttribute(const Text_t *key, const Text_t *value)
Associate string 'value' to this object under key 'key'.
RooFit::OwningPtr< RooArgSet > getObservables(const RooArgSet &set, bool valueOnly=true) const
Given a set of possible observables, return the observables that this PDF depends on.
void removeStringAttribute(const Text_t *key)
Delete a string attribute with a given key.
void setAttribute(const Text_t *name, bool value=true)
Set (default) or clear a named boolean attribute of this object.
Abstract base class for objects that represent a discrete value that can be set from the outside,...
virtual bool remove(const RooAbsArg &var, bool silent=false, bool matchByNameOnly=false)
Remove the specified argument from our list.
virtual bool add(const RooAbsArg &var, bool silent=false)
Add the specified argument to list.
void assign(const RooAbsCollection &other) const
Sets the value, cache and constant attribute of any argument in our set that also appears in the othe...
virtual bool addOwned(RooAbsArg &var, bool silent=false)
Add an argument and transfer the ownership to the collection.
Abstract base class for binned and unbinned datasets.
Abstract interface for all probability density functions.
std::unique_ptr< RooAbsArg > compileForNormSet(RooArgSet const &normSet, RooFit::Detail::CompileContext &ctx) const override
void setNormRange(const char *rangeName)
virtual double getCorrection() const
This function returns the penalty term.
const char * normRange() const
virtual ExtendMode extendMode() const
Returns ability of PDF to provide extended likelihood terms.
Abstract base class for objects that represent a real value and implements functionality common to al...
virtual void fixAddCoefNormalization(const RooArgSet &addNormSet=RooArgSet(), bool force=true)
Fix the interpretation of the coefficient of any RooAddPdf component in the expression tree headed by...
static void setEvalErrorLoggingMode(ErrorLoggingMode m)
Set evaluation error logging mode.
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
RooArgSet * selectByAttrib(const char *name, bool value) const
Use RooAbsCollection::selectByAttrib(), but return as RooArgSet.
static std::unique_ptr< RooAbsPdf > create(RooAbsPdf &pdf, RooAbsData const &data, double precision)
Creates a wrapping RooBinSamplingPdf if appropriate.
Object to represent discrete states.
Named container for two doubles, two integers two object points and three string pointers that can be...
Configurable parser for RooCmdArg named arguments.
void defineMutex(const char *head, Args_t &&... tail)
Define arguments where any pair is mutually exclusive.
bool process(const RooCmdArg &arg)
Process given RooCmdArg.
bool hasProcessed(const char *cmdName) const
Return true if RooCmdArg with name 'cmdName' has been processed.
double getDouble(const char *name, double defaultValue=0.0) const
Return double property registered with name 'name'.
bool defineDouble(const char *name, const char *argName, int doubleNum, double defValue=0.0)
Define double property name 'name' mapped to double in slot 'doubleNum' in RooCmdArg with name argNam...
RooArgSet * getSet(const char *name, RooArgSet *set=nullptr) const
Return RooArgSet property registered with name 'name'.
bool defineSet(const char *name, const char *argName, int setNum, const RooArgSet *set=nullptr)
Define TObject property name 'name' mapped to object in slot 'setNum' in RooCmdArg with name argName ...
bool ok(bool verbose) const
Return true of parsing was successful.
const char * getString(const char *name, const char *defaultValue="", bool convEmptyToNull=false) const
Return string property registered with name 'name'.
bool defineString(const char *name, const char *argName, int stringNum, const char *defValue="", bool appendMode=false)
Define double property name 'name' mapped to double in slot 'stringNum' in RooCmdArg with name argNam...
bool defineInt(const char *name, const char *argName, int intNum, int defValue=0)
Define integer property name 'name' mapped to integer in slot 'intNum' in RooCmdArg with name argName...
void allowUndefined(bool flag=true)
If flag is true the processing of unrecognized RooCmdArgs is not considered an error.
int getInt(const char *name, int defaultValue=0) const
Return integer property registered with name 'name'.
RooLinkedList filterCmdList(RooLinkedList &cmdInList, const char *cmdNameList, bool removeFromInList=true) const
Utility function to filter commands listed in cmdNameList from cmdInList.
Container class to hold N-dimensional binned data.
Container class to hold unbinned data.
static Value & defaultValue()
Collection class for internal use, storing a collection of RooAbsArg pointers in a doubly linked list...
Wrapper class around ROOT::Math::Minimizer that provides a seamless interface between the minimizer f...
RooFit::OwningPtr< RooFitResult > save(const char *name=nullptr, const char *title=nullptr)
Save and return a RooFitResult snapshot of current minimizer status.
int hesse()
Execute HESSE.
void applyCovarianceMatrix(TMatrixDSym const &V)
Apply results of given external covariance matrix.
Variable that can be changed from the outside.
void setRange(const char *name, double min, double max, bool shared=true)
Set a fit or plotting range.
Facilitates simultaneous fitting of multiple PDFs to subsets of a given dataset.
const char * GetName() const override
Returns name of object.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
RooCmdArg WeightVar(const char *name="weight", bool reinterpretAsWeight=false)
RooCmdArg Hesse(bool flag=true)
RooCmdArg ModularL(bool flag=false)
RooCmdArg PrintLevel(Int_t code)
RVec< PromoteType< T > > log(const RVec< T > &v)
CoordSystem::Scalar get(DisplacementVector2D< CoordSystem, Tag > const &p)
std::vector< std::string > Split(std::string_view str, std::string_view delims, bool skipEmpty=false)
Splits a string at each character in delims.
double nll(double pdf, double weight, int binnedL, int doBinOffset)
std::unique_ptr< T > compileForNormSet(T const &arg, RooArgSet const &normSet)
OffsetMode
For setting the offset mode with the Offset() command argument to RooAbsPdf::fitTo()
std::unique_ptr< T > cloneTreeWithSameParameters(T const &arg, RooArgSet const *observables=nullptr)
Clone RooAbsArg object and reattach to original parameters.
BinnedLOutput getBinnedL(RooAbsPdf const &pdf)
static std::size_t defaultNComponentTasks
static std::size_t defaultNEventTasks
Config argument to RooMinimizer constructor.