/* * ProfilerPlaneFitter.cpp * * Implementation of the fitter for a profiler plane data. * * Created on: Oct 13, 2015 * Author: Hovanes Egiyan */ #include "ProfilerPlaneFitter.hh" using namespace ROOT::Minuit2; using namespace std; // Strategy for fitting //MnStrategy ProfilerPlaneFitter::ppfStrategy = MnStrategy( 2 ); // Number of maximum calls to the function unsigned ProfilerPlaneFitter::ppfMaxCalls = 100000; // Allowed error for considering fit converged double ProfilerPlaneFitter::ppfTolerance = 1.0e-11; // Constructor ProfilerPlaneFitter::ProfilerPlaneFitter( const string name ) : CombinedMinimizer(), ppfName( name ), ppfStrategy(2) { return; } // Copy constructor ProfilerPlaneFitter::ProfilerPlaneFitter( const ProfilerPlaneFitter& f ) : CombinedMinimizer( f ), ppfName( f.ppfName ), ppfStrategy(f.ppfStrategy) { return; } // Destructor ProfilerPlaneFitter::~ProfilerPlaneFitter() { return; } // assignment operator ProfilerPlaneFitter& ProfilerPlaneFitter::operator=( const ProfilerPlaneFitter& f ) { CombinedMinimizer::operator=( f ); ppfName = f.ppfName; ppfStrategy = f.ppfStrategy; return *this; } // The method that we will be using to minimize the Chi2 using the function with gradients and the // initial parameter object. FunctionMinimum ProfilerPlaneFitter::Minimize( const FCNGradientBase& dist, const MnUserParameters& pars ) { return CombinedMinimizer::Minimize( dist, pars, ppfStrategy, ppfMaxCalls, ppfTolerance ); }