40using std::endl, std::ofstream, std::cout;
 
   59      const RooAbsArg *arg = (*_floatParamList).at(i);
 
   61         oocoutW(
_context, Minimization) << 
"RooAbsMinimizerFcn::RooAbsMinimizerFcn: removing parameter " 
   62                                         << arg->
GetName() << 
" from list because it is not of type RooRealVar" << endl;
 
 
   79   : _context(
other._context),
 
   80     _maxFCN(
other._maxFCN),
 
   81     _funcOffset(
other._funcOffset),
 
   82     _numBadNLL(
other._numBadNLL),
 
   83     _evalCounter(
other._evalCounter),
 
   85     _optConst(
other._optConst),
 
   88     _initFloatParamList(std::make_unique<
RooArgList>()),
 
   89     _initConstParamList(std::make_unique<
RooArgList>()),
 
   90     _logfile(
other._logfile)
 
 
  128               << 
"RooAbsMinimizerFcn::synchronize: parameter " << par->
GetName() << 
" is now floating." << endl;
 
  137               << 
"RooAbsMinimizerFcn::synchronize: value of constant parameter " << par->
GetName() << 
" changed from " 
  162            oocoutW(
_context, Minimization) << 
"RooAbsMinimizerFcn::fit: Error, non-constant parameter " 
  163                                            << par->
GetName() << 
" is not of type RooRealVar, skipping" << endl;
 
  204                  << 
"RooAbsMinimizerFcn::synchronize: WARNING: no initial error estimate available for " 
  214      if (
index >= parameters.size()) {
 
  221               parameters.back().SetLowerLimit(
pmin);
 
  222            } 
else if (par->
hasMax()) {
 
  223               parameters.back().SetUpperLimit(
pmax);
 
  243                  << 
"RooAbsMinimizerFcn::synchronize: value of parameter " << par->
GetName() << 
" changed from " 
  247         parameters[
index].Fix();
 
  251               << 
"RooAbsMinimizerFcn::synchronize: parameter " << par->
GetName() << 
" is now fixed." << endl;
 
  263                  << 
"RooAbsMinimizerFcn::synchronize: value of fixed parameter " << par->
GetName() << 
" changed from " 
  271            parameters[
index].Release();
 
  276                  << 
"RooAbsMinimizerFcn::synchronize: parameter " << par->
GetName() << 
" is now floating." << endl;
 
  286            } 
else if (par->
hasMin()) {
 
  288            } 
else if (par->
hasMax()) {
 
  299                  << 
"RooAbsMinimizerFcn::synchronize: value of parameter " << par->
GetName() << 
" changed from " 
  304                  << 
"RooAbsMinimizerFcn::synchronize: limits of parameter " << par->
GetName() << 
" changed from [" 
  311                  << 
"RooAbsMinimizerFcn::synchronize: error/step size of parameter " << par->
GetName()
 
  312                  << 
" changed from " << 
oldVerr << 
" to " << 
pstep << endl;
 
 
  362      if (eplus > 0 || 
eminus < 0) {
 
 
  378      oocoutI(
_context, Minimization) << 
"RooAbsMinimizerFcn::setLogFile: closing previous log file" << endl;
 
 
  399   for (
unsigned int i = 0; i < 
_nDim; i++) {
 
 
  413   if (par->getVal() != 
value) {
 
 
  432   std::ostringstream 
msg;
 
  433   if (
cfg().doEEWall) {
 
  434      msg << 
"RooAbsMinimizerFcn: Minimized function has error status." << endl
 
  435          << 
"Returning maximum FCN so far (" << 
_maxFCN 
  436          << 
") to force MIGRAD to back out of this region. Error log follows.\n";
 
  438      msg << 
"RooAbsMinimizerFcn: Minimized function has error status but is ignored.\n";
 
  441   msg << 
"Parameter values: ";
 
  443      auto var = 
static_cast<const RooRealVar *
>(par);
 
  444      msg << 
"\t" << var->GetName() << 
"=" << var->getVal();
 
 
  465      if (
cfg().doEEWall) {
 
 
  488         const char *
name = 
"minimizer_log_dataset";
 
 
  504         oocoutI(
_context, Minimization) << 
"RooAbsMinimizerFcn::setOptimizeConst: deactivating const optimization" 
  511         oocoutI(
_context, Minimization) << 
"RooAbsMinimizerFcn::setOptimizeConst: activating const optimization" 
  518         oocoutI(
_context, Minimization) << 
"RooAbsMinimizerFcn::setOptimizeConst: const optimization already active" 
  523         oocoutI(
_context, Minimization) << 
"RooAbsMinimizerFcn::setOptimizeConst: const optimization wasn't active" 
 
  536         << 
"RooAbsMinimizerFcn::optimizeConstantTerms: set of constant parameters changed, rerunning const optimizer" 
  541         << 
"RooAbsMinimizerFcn::optimizeConstantTerms: constant parameter values changed, rerunning const optimizer" 
 
  550   std::vector<double> values;
 
  551   values.reserve(
_nDim);
 
  555      values.push_back(par->
getVal());
 
 
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 char Point_t Rectangle_t WindowAttributes_t index
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
 
class containing the result of the fit and all the related information (fitted parameter values,...
 
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.
 
void setValueDirty()
Mark the element dirty. This forces a re-evaluation when a value is requested.
 
RooAbsCollection * selectByAttrib(const char *name, bool value) const
Create a subset of the current collection, consisting only of those elements with the specified attri...
 
void setOptimizeConst(Int_t flag)
 
std::unique_ptr< RooArgList > _floatParamList
 
bool SetLogFile(const char *inLogfile)
Change the file name for logging of a RooMinimizer of all MINUIT steppings through the parameter spac...
 
RooAbsMinimizerFcn(RooArgList paramList, RooMinimizer *context)
 
virtual bool Synchronize(std::vector< ROOT::Fit::ParameterSettings > ¶meters)
Like synchronizeParameterSettings, Synchronize informs Minuit through its parameter_settings vector o...
 
double applyEvalErrorHandling(double fvalue) const
Apply corrections on the fvalue if errors were signaled.
 
virtual void setOptimizeConstOnFunction(RooAbsArg::ConstOpCode opcode, bool doAlsoTrackingOpt)=0
This function must be overridden in the derived class to pass on constant term optimization configura...
 
void BackProp(const ROOT::Fit::FitResult &results)
Put Minuit results back into RooFit objects.
 
RooMinimizer::Config const & cfg() const
 
void finishDoEval() const
 
void optimizeConstantTerms(bool constStatChange, bool constValChange)
 
void printEvalErrors() const
Print information about why evaluation failed.
 
void ClearPdfParamAsymErr(Int_t index)
Modify PDF parameter error by ordinal index (needed by MINUIT)
 
std::vector< double > getParameterValues() const
 
void SetPdfParamErr(Int_t index, double value)
Modify PDF parameter error by ordinal index (needed by MINUIT)
 
bool synchronizeParameterSettings(std::vector< ROOT::Fit::ParameterSettings > ¶meters, bool optConst)
Informs Minuit through its parameter_settings vector of RooFit parameter properties.
 
void ApplyCovarianceMatrix(TMatrixDSym &V)
Set different external covariance matrix.
 
std::unique_ptr< RooArgList > _initConstParamList
 
std::unique_ptr< RooArgList > _constParamList
 
bool SetPdfParamVal(int index, double value) const
Set value of parameter i.
 
std::unique_ptr< RooArgList > _initFloatParamList
 
virtual double getMax(const char *name=nullptr) const
Get maximum of currently defined range.
 
bool hasMax(const char *name=nullptr) const
Check if variable has an upper bound.
 
virtual double getMin(const char *name=nullptr) const
Get minimum of currently defined range.
 
bool hasMin(const char *name=nullptr) const
Check if variable has a lower bound.
 
double getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
 
static Int_t numEvalErrors()
Return the number of logged evaluation errors since the last clearing.
 
static void printEvalErrors(std::ostream &os=std::cout, Int_t maxPerNode=10000000)
Print all outstanding logged evaluation error on the given ostream.
 
static void clearEvalErrorLog()
Clear the stack of evaluation error messages.
 
RooArgList is a container object that can hold multiple RooAbsArg objects.
 
Wrapper class around ROOT::Fit:Fitter that provides a seamless interface between the minimizer functi...
 
static int getPrintLevel()
Get the MINUIT internal printing level.
 
std::unique_ptr< RooDataSet > _logDataSet
 
std::unique_ptr< RooAbsReal::EvalErrorContext > makeEvalErrorContext() const
 
Variable that can be changed from the outside.
 
TClass * IsA() const override
 
Bool_t InheritsFrom(const char *cl) const override
Return kTRUE if this class inherits from a class with name "classname".
 
const char * GetName() const override
Returns name of object.
 
TClass * IsA() const override
 
static float unpackNaN(double val)
If val is NaN and a this NaN has been tagged as containing a payload, unpack the float from the manti...