5 #ifndef OPTIMIZER_MINUIT2_MINUITFCN_HPP_ 6 #define OPTIMIZER_MINUIT2_MINUITFCN_HPP_ 10 #include "Minuit2/FCNBase.h" 24 class MinuitFcn :
public FCNBase {
28 : Estimator(estimator){};
29 virtual ~MinuitFcn() =
default;
31 double operator()(
const std::vector<double> &x)
const {
32 Estimator.updateParametersFrom(x);
35 std::chrono::steady_clock::time_point StartTime =
36 std::chrono::steady_clock::now();
37 double result = Estimator.evaluate();
38 std::chrono::steady_clock::time_point EndTime =
39 std::chrono::steady_clock::now();
41 LOG(DEBUG) <<
"MinuitFcn: Estimator = " << std::setprecision(10) << result
42 << std::setprecision(4) <<
" Time: " 43 << std::chrono::duration_cast<std::chrono::milliseconds>(
47 LOG(DEBUG) <<
"Parameters: " << [&]() {
48 std::ostringstream params;