Go to the documentation of this file.
9 #ifndef CBM_RICH_RING_FITTER_ELLIPSE_MINUIT
10 #define CBM_RICH_RING_FITTER_ELLIPSE_MINUIT
14 #include "Math/IFunction.h"
21 class FCNEllipse2 :
public ROOT::Math::IBaseFunctionMultiDim {
27 : ROOT::Math::IBaseFunctionMultiDim(),
fX(
x),
fY(
y) {}
31 for (UInt_t
i = 0;
i <
fX.size();
i++) {
38 Double_t
calcE(Int_t
i,
const double* par)
const {
39 Double_t d1 =
sqrt((
fX[
i] - par[0]) * (
fX[
i] - par[0])
40 + (
fY[
i] - par[1]) * (
fY[
i] - par[1]));
41 Double_t d2 =
sqrt((
fX[
i] - par[2]) * (
fX[
i] - par[2])
42 + (
fY[
i] - par[3]) * (
fY[
i] - par[3]));
43 Double_t ri = d1 + d2 - 2 * par[4];
47 unsigned int NDim()
const {
return 5; }
49 ROOT::Math::IBaseFunctionMultiDim*
Clone()
const {
86 vector<double>
DoFit(
const vector<double>&
x,
const vector<double>&
y);
Base class for concrete ellipse fitting algorithms. Each derived class must implement the method DoFi...
void TransformToRichRing(CbmRichRingLight *ring, const vector< double > &par)
Transform obtained parameters from MINUIT to CbmRichRingLight.
virtual ~CbmRichRingFitterEllipseMinuit()
Standard destructor.
friend F32vec4 sqrt(const F32vec4 &a)
Base class for concrete ellipse fitting algorithms. Each derived class must implement the method DoFi...
unsigned int NDim() const
virtual void DoFit(CbmRichRingLight *ring)
Inherited from CbmRichRingFitterBase.
CbmRichRingFitterEllipseMinuit()
Default constructor.
double DoEval(const double *x) const
Double_t calcE(Int_t i, const double *par) const
FCNEllipse2(vector< Double_t > x, vector< Double_t > y)
This is the implementation of ellipse fitting using MINUIT.
ROOT::Math::IBaseFunctionMultiDim * Clone() const