DriftCorrect::DriftCorrect(const HiCalConf &conf) : NonLinearLSQ(), Component("DriftCorrect") { DbProfile prof = conf.getMatrixProfile(); _history.add("Profile["+ prof.Name()+"]"); _timet.setBin(ToInteger(prof("Summing"))); _timet.setLineTime(ToDouble(prof("ScanExposureDuration"))); _skipFit = IsEqual(ConfKey(prof, "ZdSkipFit", std::string("TRUE")), "TRUE"); _useLinFit = IsTrueValue(prof, "ZdOnFailUseLinear"); _absErr = ConfKey(prof, "AbsoluteError", 1.0E-4); _relErr = ConfKey(prof, "RelativeError", 1.0E-4); _sWidth = ConfKey(prof, "GuessFilterWidth", 17); _sIters = ConfKey(prof, "GuessFilterIterations", 1); if ( prof.exists("MaximumIterations") ) { setMaxIters(ToInteger(prof("MaximumIterations"))); } _maxLog = ConfKey(prof, "MaximumLog", 709.0); _badLines = ToInteger(prof("TrimLines"))/ToInteger(prof("Summing")); _minLines = ConfKey(prof,"ZdMinimumLines", 100); string histstr = "DriftCorrect(AbsErr[" + ToString(_absErr) + "],RelErr[" + ToString(_relErr) + "],MaxIter[" + ToString(maxIters()) + "])"; _history.add(histstr); }
// Optimise the mapping void CLinearMapping::optimise(unsigned int iters) { if(getVerbosity()>2) { cout << "Initial model:" << endl; display(cout); } if(getVerbosity()>2 && getOptNumParams()<40) checkGradients(); setMaxIters(iters); runDefaultOptimiser(); if(getVerbosity()>1) cout << "... done. " << endl; if(getVerbosity()>0) display(cout); }
//! Constructor StatusTestMaxIters(int maxIter, bool negate = false) : state_(Undefined), negate_(negate) { setMaxIters(maxIter); };