59#ifdef ROOFIT_MULTIPROCESS
79class FreezeDisconnectedParametersRAII {
81 FreezeDisconnectedParametersRAII(RooMinimizer
const *minimizer, RooAbsMinimizerFcn
const &fcn)
82 : _minimizer{minimizer}, _frozen{fcn.freezeDisconnectedParameters()}
84 if (!_frozen.empty()) {
85 oocoutI(_minimizer, Minimization) <<
"Freezing disconnected parameters: " << _frozen << std::endl;
88 ~FreezeDisconnectedParametersRAII()
90 if (!_frozen.empty()) {
91 oocoutI(_minimizer, Minimization) <<
"Unfreezing disconnected parameters: " << _frozen << std::endl;
97 RooMinimizer
const *_minimizer =
nullptr;
101std::vector<std::vector<int>> generateOrthogonalCombinations(
const std::vector<int> &maxValues)
103 std::vector<std::vector<int>> combos;
104 std::vector<int> base(maxValues.size(), 0);
105 combos.push_back(base);
106 for (
size_t i = 0; i < maxValues.size(); ++i) {
107 for (
int v = 1;
v < maxValues[i]; ++
v) {
108 std::vector<int> tmp = base;
110 combos.push_back(tmp);
116void reorderCombinations(std::vector<std::vector<int>> &combos,
const std::vector<int> &max,
117 const std::vector<int> &base)
119 for (
auto &combo : combos) {
120 for (
size_t i = 0; i < combo.size(); ++i) {
121 combo[i] = (combo[i] + base[i]) % max[i];
134std::unique_ptr<ChangeOperModeRAII> setOperModesDirty(
RooAbsReal &function)
136 if (
auto *wrapper =
dynamic_cast<RooFit::Experimental::RooEvaluatorWrapper *
>(&function)) {
161 if (nll_real !=
nullptr) {
162 if (
_cfg.parallelize != 0) {
164#ifdef ROOFIT_MULTIPROCESS
165 if (!
_cfg.enableParallelGradient) {
168 coutI(InputArguments) <<
"Modular likelihood detected and likelihood parallelization requested, "
169 <<
"also setting parallel gradient calculation mode." << std::endl;
170 _cfg.enableParallelGradient =
true;
174 if (
_cfg.parallelize > 0)
178 _fcn = std::make_unique<RooFit::TestStatistics::MinuitFcnGrad>(
179 nll_real->getRooAbsL(),
this,
_config.ParamsSettings(),
181 static_cast<RooFit::TestStatistics::LikelihoodMode>(int(_cfg.enableParallelDescent))},
184 throw std::logic_error(
185 "Parallel minimization requested, but ROOT was not compiled with multiprocessing enabled, "
186 "please recompile with -Droofit_multiprocess=ON for parallel evaluation");
189 coutW(InputArguments)
190 <<
"Requested modular likelihood without gradient parallelization, some features such as offsetting "
191 <<
"may not work yet. Non-modular likelihoods are more reliable without parallelization." << std::endl;
197 _fcn = std::make_unique<RooMinimizerFcn>(&function,
this);
200 if (
_cfg.parallelize != 0) {
201 throw std::logic_error(
"In RooMinimizer constructor: Selected likelihood evaluation but a "
202 "non-modular likelihood was given. Please supply ModularL(true) as an "
203 "argument to createNLL for modular likelihoods to use likelihood "
204 "or gradient parallelization.");
206 _fcn = std::make_unique<RooMinimizerFcn>(&function,
this);
214 RooSentinel::activate();
225 _config.MinimizerOptions().SetMaxIterations(500 *
_fcn->getNDim());
226 _config.MinimizerOptions().SetMaxFunctionCalls(500 *
_fcn->getNDim());
244 if (
_cfg.offsetting != -1) {
262 _config.MinimizerOptions().SetStrategy(istrat);
271 _config.MinimizerOptions().SetMaxIterations(
n);
280 _config.MinimizerOptions().SetMaxFunctionCalls(
n);
291 _config.MinimizerOptions().SetErrorDef(level);
299 _config.MinimizerOptions().SetTolerance(eps);
307 _cfg.offsetting = flag;
308 _fcn->setOffsetting(
_cfg.offsetting);
321 if ((
_cfg.parallelize != 0) &&
_cfg.minimizerType !=
"Minuit2") {
322 std::stringstream ss;
323 ss <<
"In RooMinimizer::setMinimizerType: only Minuit2 is supported when not using classic function mode!";
325 ss <<
"\nPlease set it as your default minimizer via "
326 "ROOT::Math::MinimizerOptions::SetDefaultMinimizer(\"Minuit2\").";
328 throw std::invalid_argument(ss.str());
339 coutE(Minimization) <<
"RooMinimizer: all function calls during minimization gave invalid NLL values!"
355 if (
_cfg.timingAnalysis) {
356#ifdef ROOFIT_MULTIPROCESS
359 throw std::logic_error(
"ProcessTimer, but ROOT was not compiled with multiprocessing enabled, "
360 "please recompile with -Droofit_multiprocess=ON for logging with the "
367 _config.SetMinimizer(
_cfg.minimizerType.c_str(), alg);
392 return exec(
"migrad",
"MIGRAD");
397 FreezeDisconnectedParametersRAII freeze(
this, *
_fcn);
405 if (algoName ==
"hesse") {
409 }
else if (algoName ==
"minos") {
414 _config.SetMinimizer(
_cfg.minimizerType.c_str(), algoName.c_str());
436 coutW(Minimization) <<
"RooMinimizer::hesse: Error, run Migrad before Hesse!" << std::endl;
441 return exec(
"hesse",
"HESSE");
453 coutW(Minimization) <<
"RooMinimizer::minos: Error, run Migrad before Minos!" << std::endl;
458 return exec(
"minos",
"MINOS");
470 coutW(Minimization) <<
"RooMinimizer::minos: Error, run Migrad before Minos!" << std::endl;
472 }
else if (!minosParamList.
empty()) {
473 FreezeDisconnectedParametersRAII freeze(
this, *
_fcn);
481 std::vector<unsigned int> paramInd;
486 int index = floatParams.
index(par);
487 paramInd.push_back(index);
491 if (!paramInd.empty()) {
493 _config.SetMinosErrors(paramInd);
519 return exec(
"seek",
"SEEK");
530 return exec(
"simplex",
"SIMPLEX");
541 return exec(
"migradimproved",
"IMPROVE");
549 _config.MinimizerOptions().SetPrintLevel(newLevel + 1);
557 return _config.MinimizerOptions().PrintLevel() + 1;
578 coutW(Minimization) <<
"RooMinimizer::save: Error, run minimization before!" << std::endl;
582 std::string
name = userName ? std::string{userName} :
_fcn->getFunctionName();
583 std::string title = userTitle ? std::string{userTitle} :
_fcn->getFunctionTitle();
584 auto fitRes = std::make_unique<RooFitResult>(
name.c_str(), title.c_str());
586 fitRes->setConstParList(
_fcn->constParams());
588 fitRes->setNumInvalidNLL(
_fcn->GetNumInvalidNLL());
591 fitRes->setCovQual(
_minimizer->CovMatrixStatus());
592 fitRes->setMinNLL(
_result->fVal -
_fcn->getOffset());
595 fitRes->setInitParList(
_fcn->initFloatParams());
596 fitRes->setFinalParList(
_fcn->floatParams());
601 fitRes->setCovarianceMatrix(*
_extV);
612double covMatrix(std::vector<double>
const &covMat,
unsigned int i,
unsigned int j)
616 return j < i ? covMat[j + i * (i + 1) / 2] : covMat[i + j * (j + 1) / 2];
620double correlation(std::vector<double>
const &covMat,
unsigned int i,
unsigned int j)
624 double tmp = covMatrix(covMat, i, i) * covMatrix(covMat, j, j);
625 return tmp > 0 ? covMatrix(covMat, i, j) / std::sqrt(tmp) : 0;
632 const std::size_t nParams =
_fcn->getNDim();
635 std::vector<double> globalCC =
_minimizer->GlobalCC();
636 globalCC.resize(nParams);
637 for (std::size_t ic = 0; ic < nParams; ic++) {
638 for (std::size_t ii = 0; ii < nParams; ii++) {
639 corrs(ic, ii) = correlation(
_result->fCovMatrix, ic, ii);
640 covs(ic, ii) = covMatrix(
_result->fCovMatrix, ic, ii);
663 double n5,
double n6,
unsigned int npoints)
670 int index1 = params.
index(&var1);
672 coutE(Minimization) <<
"RooMinimizer::contour(" <<
GetName() <<
") ERROR: " << var1.
GetName()
673 <<
" is not a floating parameter of " <<
_fcn->getFunctionName() << std::endl;
677 int index2 = params.
index(&var2);
679 coutE(Minimization) <<
"RooMinimizer::contour(" <<
GetName() <<
") ERROR: " << var2.
GetName()
680 <<
" is not a floating parameter of PDF " <<
_fcn->getFunctionName() << std::endl;
694 coutW(Minimization) <<
"RooMinimizer::contour: Error, run Migrad before contours!" << std::endl;
709 auto operModeRAII = setOperModesDirty(
_function);
710 for (
int ic = 0; ic < 6; ic++) {
717 std::vector<double> xcoor(npoints + 1);
718 std::vector<double> ycoor(npoints + 1);
719 bool ret =
_minimizer->Contour(index1, index2, npoints, xcoor.data(), ycoor.data());
722 coutE(Minimization) <<
"RooMinimizer::contour(" <<
GetName()
723 <<
") ERROR: MINUIT did not return a contour graph for n=" <<
n[ic] << std::endl;
725 xcoor[npoints] = xcoor[0];
726 ycoor[npoints] = ycoor[0];
727 TGraph *graph =
new TGraph(npoints + 1, xcoor.data(), ycoor.data());
729 std::stringstream
name;
730 name <<
"contour_" <<
_fcn->getFunctionName() <<
"_n" <<
n[ic];
754#ifdef ROOFIT_MULTIPROCESS
756 std::vector<std::string> parameter_names;
758 parameter_names.push_back(parameter->GetName());
760 coutI(Minimization) <<
"parameter name: " << parameter_names.back() << std::endl;
765 coutI(Minimization) <<
"Not adding parameters to processtimer because multiprocessing is not enabled." << std::endl;
789 coutI(Minimization) <<
"Command timer: ";
791 coutI(Minimization) <<
"Session timer: ";
813 oocoutE(
nullptr, InputArguments) <<
"RooMinimizer::save: Error, run minimization before!" << std::endl;
817 auto res = std::make_unique<RooFitResult>(
"lastMinuitFit",
"Last MINUIT fit");
826 for (
unsigned int i = 0; i <
_fcn->getNDim(); ++i) {
829 bool isConst(
_result->isParameterFixed(i));
831 double xlo =
_config.ParSettings(i).LowerLimit();
832 double xhi =
_config.ParSettings(i).UpperLimit();
833 double xerr =
_result->error(i);
834 double xval =
_result->fParams[i];
836 std::unique_ptr<RooRealVar> var;
838 if ((xlo < xhi) && !isConst) {
839 var = std::make_unique<RooRealVar>(varName, varName, xval, xlo, xhi);
841 var = std::make_unique<RooRealVar>(varName, varName, xval);
843 var->setConstant(isConst);
853 res->setConstParList(constPars);
854 res->setInitParList(floatPars);
855 res->setFinalParList(floatPars);
858 res->setCovQual(
_minimizer->CovMatrixStatus());
859 res->setStatus(
_result->fStatus);
873 _cfg.recoverFromNaN = strength;
884 return _fcn->evalCounter();
888 _fcn->zeroEvalCount();
893 return _fcn->getNDim();
898 return _fcn->GetLogFile();
902 return _fcn->GetMaxFCN();
906 return _fcn->getOffset();
916 return std::make_unique<RooAbsReal::EvalErrorContext>(
m);
924 auto operModeRAII = setOperModesDirty(
_function);
929 coutE(Minimization) <<
"RooMinimizer::fitFCN(): FCN function has zero parameters" << std::endl;
938 for (
auto arg :
_fcn->allParams()) {
939 if (arg->isCategory() && !arg->isConstant())
940 floatingCats.
add(*arg);
943 std::vector<RooCategory *> pdfIndices;
944 for (
auto *arg : floatingCats) {
946 pdfIndices.push_back(cat);
949 const size_t nPdfs = pdfIndices.size();
953 for (
auto arg :
_fcn->allParams()) {
954 if (!arg->isCategory() && !arg->isConstant())
955 floatReals.
add(*arg);
959 coutI(Minimization) <<
"[fitFCN] No discrete parameters, performing continuous minimization only" << std::endl;
960 FreezeDisconnectedParametersRAII freeze(
this, *
_fcn);
963 _result = std::make_unique<FitResult>();
972 std::vector<int> maxIndices;
973 for (
auto *cat : pdfIndices)
974 maxIndices.push_back(cat->size());
976 std::set<std::vector<int>> tried;
977 std::map<std::vector<int>,
double> nllMap;
978 std::vector<int> bestIndices(nPdfs, 0);
979 double bestNLL = 1e30;
981 bool improved =
true;
984 auto combos = generateOrthogonalCombinations(maxIndices);
985 reorderCombinations(combos, maxIndices, bestIndices);
987 for (
const auto &combo : combos) {
988 if (tried.count(combo))
991 for (
size_t i = 0; i < nPdfs; ++i)
992 pdfIndices[i]->setIndex(combo[i]);
995 std::vector<bool> wasConst(nPdfs);
996 for (
size_t i = 0; i < nPdfs; ++i) {
997 wasConst[i] = pdfIndices[i]->isConstant();
998 pdfIndices[i]->setConstant(
true);
1000 FreezeDisconnectedParametersRAII freeze(
this, *
_fcn);
1003 for (
size_t i = 0; i < nPdfs; ++i)
1004 pdfIndices[i]->setConstant(wasConst[i]);
1007 tried.insert(combo);
1008 nllMap[combo] = val;
1010 if (val < bestNLL) {
1012 bestIndices = combo;
1018 for (
size_t i = 0; i < nPdfs; ++i) {
1019 pdfIndices[i]->setIndex(bestIndices[i]);
1022 FreezeDisconnectedParametersRAII freeze(
this, *
_fcn);
1025 coutI(Minimization) <<
"All NLL Values per Combination:" << std::endl;
1026 for (
const auto &entry : nllMap) {
1027 const auto &combo = entry.first;
1028 double val = entry.second;
1030 std::stringstream ss;
1032 for (
size_t i = 0; i < combo.size(); ++i) {
1034 if (i + 1 < combo.size())
1037 ss <<
"], NLL: " << val;
1039 coutI(Minimization) << ss.str() << std::endl;
1042 std::stringstream ssBest;
1043 ssBest <<
"DP Best Indices: [";
1044 for (
size_t i = 0; i < bestIndices.size(); ++i) {
1045 ssBest << bestIndices[i];
1046 if (i + 1 < bestIndices.size())
1049 ssBest <<
"], NLL = " << bestNLL;
1051 coutI(Minimization) << ssBest.str() << std::endl;
1054 _result = std::make_unique<FitResult>();
1065 auto operModeRAII = setOperModesDirty(
_function);
1069 coutE(Minimization) <<
"RooMinimizer::calculateHessErrors() Error re-initializing the minimizer" << std::endl;
1076 coutE(Minimization) <<
"RooMinimizer::calculateHessErrors() Error when calculating Hessian" << std::endl;
1101 auto operModeRAII = setOperModesDirty(
_function);
1105 coutE(Minimization) <<
"RooMinimizer::calculateHessErrors() Error re-initializing the minimizer" << std::endl;
1109 const std::vector<unsigned int> &ipars =
_config.MinosParams();
1110 unsigned int n = (!ipars.empty()) ? ipars.size() :
_fcn->getNDim();
1119 coutI(Minimization) <<
"RooMinimizer::calculateMinosErrors() Run again Minos for some parameters because a "
1120 "new Minimum has been found"
1123 for (
int i = 0; i < iparMax; ++i) {
1125 unsigned int index = (!ipars.empty()) ? ipars[i] : i;
1132 _result->fMinosErrors.emplace(index, std::make_pair(elow, eup));
1136 iparMax = iparNewMin;
1138 }
while (iparNewMin > 0 && iter < 10);
1141 <<
"RooMinimizer::calculateMinosErrors() Minos error calculation failed for all the selected parameters"
1158 if (
_cfg.setInitialCovariance) {
1159 std::vector<double>
v;
1160 for (std::size_t i = 0; i <
_fcn->getNDim(); ++i) {
1174 std::string newMinimType =
_config.MinimizerName();
1177 if (canDifferentMinim) {
1178 std::string msg =
"Using now " + newMinimType;
1179 coutI(Minimization) <<
"RooMinimizer::updateMinimizerOptions(): " << msg << std::endl;
1182 std::string msg =
"Cannot change minimizer. Continue using " +
_result->fMinimType;
1183 coutW(Minimization) <<
"RooMinimizer::updateMinimizerOptions() " << msg << std::endl;
1202 for (
unsigned int i = 0; i <
_config.NPar(); ++i) {
1223 if ((
fMinimType.find(
"Fumili") == std::string::npos) && (
fMinimType.find(
"GSLMultiFit") == std::string::npos)) {
1224 if (!fconfig.MinimizerAlgoType().empty())
1225 fMinimType +=
" / " + fconfig.MinimizerAlgoType();
1229 for (
unsigned int i = 0; i < fconfig.
NPar(); ++i) {
1253 const unsigned int npar = min.
NDim();
1258 _result->fParams = std::vector<double>(min.
X(), min.
X() + npar);
1261 _result->fParams.resize(npar);
1262 for (
unsigned int i = 0; i < npar; ++i) {
1268 for (
unsigned int ipar = 0; ipar < npar; ++ipar) {
1270 _result->fFixedParams[ipar] =
true;
1278 if (min.
Errors() !=
nullptr) {
1294 const std::size_t npar =
_result->fParams.size();
1304 std::copy(min.
X(), min.
X() + npar,
_result->fParams.begin());
1306 if (min.
Errors() !=
nullptr) {
1315 const std::size_t npar =
_result->fParams.size();
1317 _result->fErrors.resize(npar);
1320 if (
_result->fCovStatus != 0) {
1323 unsigned int r = npar * (npar + 1) / 2;
1326 for (
unsigned int i = 0; i < npar; ++i) {
1327 for (
unsigned int j = 0; j <= i; ++j)
1357 const size_t nParams =
fParams.size();
1359 for (std::size_t ic = 0; ic < nParams; ic++) {
1360 for (std::size_t ii = 0; ii < nParams; ii++) {
1361 covs(ic, ii) = covMatrix(
fCovMatrix, ic, ii);
TMatrixTSym< Double_t > TMatrixDSym
Class describing the configuration of the fit, options and parameter settings using the ROOT::Fit::Pa...
unsigned int NPar() const
number of parameters settings
std::string MinimizerName() const
return Minimizer full name (type / algorithm)
const std::string & MinimizerType() const
return type of minimizer package
const ParameterSettings & ParSettings(unsigned int i) const
get the parameter settings for the i-th parameter (const method)
Class, describing value, limits and step size of the parameters Provides functionality also to set/re...
bool IsFixed() const
check if is fixed
void SetValue(double val)
set the value
void SetStepSize(double err)
set the step size
double Value() const
return parameter value
double StepSize() const
return step size
static const std::string & DefaultMinimizerType()
Abstract Minimizer class, defining the interface for the various minimizer (like Minuit2,...
virtual const double * Errors() const
virtual const double * X() const =0
virtual int CovMatrixStatus() const
int Status() const
Status code of minimizer.
virtual double CovMatrix(unsigned int ivar, unsigned int jvar) const
virtual double Edm() const
virtual double MinValue() const =0
virtual unsigned int NDim() const =0
this is <= Function().NDim() which is the total number of variables (free+ constrained ones)
Common abstract base class for objects that represent a value and a "shape" in RooFit.
bool isConstant() const
Check if the "Constant" attribute is set.
RooAbsCollection * snapshot(bool deepCopy=true) const
Take a snap shot of current collection contents.
virtual bool add(const RooAbsArg &var, bool silent=false)
Add the specified argument to list.
Int_t index(const RooAbsArg *arg) const
Returns index of given arg, or -1 if arg is not in the collection.
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.
RooAbsArg * find(const char *name) const
Find object with given name in list.
Abstract base class for objects that represent a real value and implements functionality common to al...
double getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
static void clearEvalErrorLog()
Clear the stack of evaluation error messages.
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooAbsArg * at(Int_t idx) const
Return object at given index, or nullptr if index is out of range.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Object to represent discrete states.
RooFitResult is a container class to hold the input and output of a PDF fit to a dataset.
void fillCorrMatrix(const std::vector< double > &globalCC, const TMatrixDSym &corrs, const TMatrixDSym &covs)
Function called by RooMinimizer.
static void setDefaultNWorkers(unsigned int N_workers)
static void setTimingAnalysis(bool timingAnalysis)
static void add_metadata(json data)
RooAbsReal that wraps RooAbsL likelihoods for use in RooFit outside of the RooMinimizer context.
void setRecoverFromNaNStrength(double strength)
Try to recover from invalid function values.
int getPrintLevel()
Get the MINUIT internal printing level.
void optimizeConst(int flag)
void initMinimizerFirstPart()
Initialize the part of the minimizer that is independent of the function to be minimized.
std::ofstream * logfile()
int simplex()
Execute SIMPLEX.
std::unique_ptr< TMatrixDSym > _extV
void setMinimizerType(std::string const &type)
Choose the minimizer algorithm.
RooFit::OwningPtr< RooFitResult > save(const char *name=nullptr, const char *title=nullptr)
Save and return a RooFitResult snapshot of current minimizer status.
std::vector< std::pair< std::string, int > > _statusHistory
void profileStart()
Start profiling timer.
RooPlot * contour(RooRealVar &var1, RooRealVar &var2, double n1=1.0, double n2=2.0, double n3=0.0, double n4=0.0, double n5=0.0, double n6=0.0, unsigned int npoints=50)
Create and draw a TH2 with the error contours in the parameters var1 and var2.
std::unique_ptr< ROOT::Math::Minimizer > _minimizer
! pointer to used minimizer
bool setLogFile(const char *logf=nullptr)
void initMinimizerFcnDependentPart(double defaultErrorLevel)
Initialize the part of the minimizer that is dependent on the function to be minimized.
void fillCorrMatrix(RooFitResult &fitRes)
double & fcnOffset() const
ROOT::Fit::FitConfig _config
fitter configuration (options and parameter settings)
void profileStop()
Stop profiling timer and report results of last session.
int minos()
Execute MINOS.
bool calculateHessErrors()
int hesse()
Execute HESSE.
bool calculateMinosErrors()
void setErrorLevel(double level)
Set the level for MINUIT error analysis to the given value.
void determineStatus(bool fitterReturnValue)
int migrad()
Execute MIGRAD.
bool update(bool isValid)
bool updateMinimizerOptions(bool canDifferentMinim=true)
void setEps(double eps)
Change MINUIT epsilon.
void setPrintLevel(int newLevel)
Change the MINUIT internal printing level.
void fillResult(bool isValid)
int exec(std::string const &algoName, std::string const &statusName)
int improve()
Execute IMPROVE.
void setOffsetting(bool flag)
Enable internal likelihood offsetting for enhanced numeric precision.
RooMinimizer::Config _cfg
std::unique_ptr< FitResult > _result
! pointer to the object containing the result of the fit
RooFit::OwningPtr< RooFitResult > lastMinuitFit()
void saveStatus(const char *label, int status)
~RooMinimizer() override
Destructor.
int minimize(const char *type, const char *alg=nullptr)
Minimise the function passed in the constructor.
std::unique_ptr< RooAbsReal::EvalErrorContext > makeEvalErrorContext() const
RooMinimizer(RooAbsReal &function, Config const &cfg={})
Construct MINUIT interface to given function.
void setMaxFunctionCalls(int n)
Change maximum number of likelihood function class from MINUIT (RooMinimizer default 500 * #parameter...
void setStrategy(int istrat)
Change MINUIT strategy to istrat.
void setMaxIterations(int n)
Change maximum number of MINUIT iterations (RooMinimizer default 500 * #parameters).
void addParamsToProcessTimer()
Add parameters in metadata field to process timer.
std::unique_ptr< RooAbsMinimizerFcn > _fcn
void applyCovarianceMatrix(TMatrixDSym const &V)
Apply results of given external covariance matrix.
static RooMsgService & instance()
Return reference to singleton instance.
Plot frame and a container for graphics objects within that frame.
void addObject(TObject *obj, Option_t *drawOptions="", bool invisible=false)
Add a generic object to this plot.
Variable that can be changed from the outside.
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
void SetName(const char *name="") override
Set the name of the TNamed.
TMatrixTBase< Element > & ResizeTo(Int_t nrows, Int_t ncols, Int_t=-1) override
Set size of the matrix to nrows x ncols New dynamic elements are created, the overlapping part of the...
const char * GetName() const override
Returns name of object.
virtual const char * GetName() const
Returns name of object.
T * OwningPtr
An alias for raw pointers for indicating that the return type of a RooFit function is an owning point...
OwningPtr< T > makeOwningPtr(std::unique_ptr< T > &&ptr)
Internal helper to turn a std::unique_ptr<T> into an OwningPtr.
bool setAllConstant(const RooAbsCollection &coll, bool constant=true)
set all RooRealVars to constants. return true if at least one changed status
Config argument to RooMinimizer constructor.
std::map< unsigned int, std::pair< double, double > > fMinosErrors
map contains the two Minos errors
double upperError(unsigned int i) const
std::string fMinimType
string indicating type of minimizer
std::vector< double > fErrors
errors
double error(unsigned int i) const
std::vector< double > fParams
parameter values. Size is total number of parameters
void GetCovarianceMatrix(TMatrixDSym &cov) const
std::map< unsigned int, bool > fFixedParams
list of fixed parameters
bool isParameterFixed(unsigned int ipar) const
int fCovStatus
covariance matrix status code
std::vector< double > fCovMatrix
covariance matrix (size is npar*(npar+1)/2) where npar is total parameters
int fStatus
minimizer status code
double lowerError(unsigned int i) const