#include <FitManagerMinuit1.h>
Definition at line 11 of file FitManagerMinuit1.h.
◆ Minuit1()
GooFit::Minuit1::Minuit1 |
( |
PdfBase * |
pdfPointer | ) |
|
Definition at line 13 of file FitManagerMinuit1.cpp.
References GooFit::PdfBase::copyParams().
15 , pdfPointer(pdfPointer)
19 for(Variable &var : vars) {
20 var.setFitterIndex(counter);
22 Int_t err = DefineParameter(
23 counter, var.getName().c_str(), var.getValue(), var.getError(), var.getLowerLimit(), var.getUpperLimit());
25 if(GetNumPars() != counter + 1)
27 "Error when implementing param {} (possibly invalid error/lowerlimit/upperlimit values)!",
34 FixParameter(counter);
Thrown when a general error is encountered.
int max_index(const std::vector< Variable > &vars)
Get the max index of a variable from a list.
__host__ void copyParams(const std::vector< double > &pars) const
virtual __host__ std::vector< Variable > getParameters() const
◆ Eval()
Int_t GooFit::Minuit1::Eval |
( |
Int_t |
npar, |
|
|
Double_t * |
grad, |
|
|
Double_t & |
fval, |
|
|
Double_t * |
par, |
|
|
Int_t |
flag |
|
) |
| |
|
override |
Fit function for Minuit.
Definition at line 42 of file FitManagerMinuit1.cpp.
References GooFit::PdfBase::calculateNLL(), GooFit::PdfBase::copyParams(), GOOFIT_TRACE, GOOFIT_WARN, GooFit::host_callnumber, and GooFit::max_index().
43 std::vector<double> pars{fp, fp + GetNumPars()};
45 std::vector<double> gooPars;
48 for(Variable &var : vars) {
49 if(std::isnan(pars.at(var.getFitterIndex())))
50 GOOFIT_WARN(
"Variable {} at {} is NaN", var.getName(), var.getIndex());
52 var.setChanged(var.getValue() != pars.at(var.getFitterIndex()));
53 var.setValue(pars.at(var.getFitterIndex()));
54 gooPars.at(var.getIndex()) = var.getValue() - var.getBlind(Variable::Key());
virtual __host__ double calculateNLL() const =0
#define GOOFIT_TRACE(...)
int max_index(const std::vector< Variable > &vars)
Get the max index of a variable from a list.
__host__ void copyParams(const std::vector< double > &pars) const
◆ getVaraibles()
std::vector<Variable> GooFit::Minuit1::getVaraibles |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following files: