61 enum eMinimizeType { kScan, kAnt };
65 std::vector<FitParam> fParameters;
66 std::vector<Double_t> fParamsMin;
67 std::vector<Int_t> fNonConstMap;
68 std::vector<std::vector<Double_t>> fAllowedValues;
69 std::vector<Int_t> fStateVector;
70 std::vector<Int_t> fStateVectorMin;
72 ROOT::Math::IMultiGenFunction* fFunc;
73 eMinimizeType fMinimizeType;
75 Int_t fFreePars = {0};
86 void EstimateErrors();
89 void MinimizeNelderMead();
90 void ChangeStateVector(std::vector<Int_t>& vec);
92 void EstimateError(Int_t par, Double_t& min, Double_t& quantumMin, Double_t& error);
93 Bool_t LoopOverParameter(Int_t param);
94 Bool_t IsFixed(Int_t i)
const;
96 Int_t GetNParams()
const {
return fParameters.size(); };
97 Int_t GetNFree()
const {
return fNonConstMap.size(); };
98 Int_t GetNFixed()
const {
return fParameters.size() - fNonConstMap.size(); };
102 void SetNDF(Double_t ndf) { fNDF = ndf; }
103 void SetTrace(Bool_t trace) { fTrace = trace; };
117 virtual bool SetVariable(
unsigned int ,
const std::string& ,
double ,
double ) {
121 virtual bool SetParLimits(
unsigned int ivar,
double min,
double max);
129 virtual bool SetFixedVariable(
unsigned int ivar,
const std::string& name,
double val);
141 SetLimitedVariable(
unsigned int ivar,
const std::string& name,
double val,
double points,
double lower,
double upper);
150 virtual bool Minimize();
151 virtual void Reset();
152 virtual void SetParamConf(
const MinimizerStepConf& conf, Bool_t overwrite);
153 virtual double MinValue()
const {
return 0; };
154 virtual const double* X()
const;
155 virtual const double* Errors()
const {
return fErrors; }
156 virtual double Edm()
const {
return -1; }
157 virtual const double* MinGradient()
const {
return NULL; }
158 virtual unsigned int NCalls()
const {
return 0; };
159 virtual unsigned int NIterations()
const {
return NCalls(); }
160 virtual unsigned int NDim()
const {
return fParameters.size(); };
161 void SetFunction(
const ROOT::Math::IMultiGenFunction& func);
162 void SetMinimizerType(TString opt);
163 FitParam GetParConf(Int_t idx)
const {
return fParameters[idx]; }
164 virtual ~Minimizer();
165 ClassDef(Minimizer, 1)