/* * ProfilerPlaneFitter.hh * * Class to fit the profiler data. Inherits from CombinedMinimizer of Minuit2 ROOT package. * To use this I will also need to describe the functions for FCN and the derivative. * Since this class does not have the information on the data point the actual implementation * of the fitter will be done in a subclass that will contain the measurements for each time * slice of the profiler. * * Created on: Oct 13, 2015 * Author: Hovanes Egiyan */ #ifndef PROFILERPLANEFITTER_HH_ #define PROFILERPLANEFITTER_HH_ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "TROOT.h" #include "Minuit2/CombinedMinimizer.h" #include "Minuit2/FunctionMinimum.h" #include "Minuit2/MnStrategy.h" class ProfilerPlaneFitter : public ROOT::Minuit2::CombinedMinimizer { protected: static unsigned ppfMaxCalls; static double ppfTolerance; // Name of the minimizer std::string ppfName; // MINUIT strategy ROOT::Minuit2::MnStrategy ppfStrategy; public: // Main constructor, always need name ProfilerPlaneFitter( const std::string name ); // Copy constructor ProfilerPlaneFitter( const ProfilerPlaneFitter& f ); // Destructor virtual ~ProfilerPlaneFitter(); // Assignment operator ProfilerPlaneFitter& operator=( const ProfilerPlaneFitter& f ); virtual ROOT::Minuit2::FunctionMinimum Minimize( const ROOT::Minuit2::FCNGradientBase& dist, const ROOT::Minuit2::MnUserParameters& pars ); std::string getName() const { return ppfName; } std::string setName( const std::string name ) { return (this->ppfName = name); } static unsigned getMaxCalls() { return ppfMaxCalls; } static unsigned setMaxCalls( const unsigned maxCalls ) { return (ppfMaxCalls = maxCalls); } virtual inline ROOT::Minuit2::MnStrategy getStrategy() const { return ppfStrategy; } virtual inline ROOT::Minuit2::MnStrategy setStrategy( const ROOT::Minuit2::MnStrategy strat ) { return (ppfStrategy = strat); } static double getTolerance() { return ppfTolerance; } static double setTolerance( const double toler ) { return (ppfTolerance = toler); } }; #endif /* PROFILERPLANEFITTER_HH_ */