Go to the documentation of this file.
11 #ifndef CBM_RICH_RING_FITTER_ELLIPSE_BASE
12 #define CBM_RICH_RING_FITTER_ELLIPSE_BASE
58 double xf1 = ring->
GetXF1();
59 double yf1 = ring->
GetYF1();
60 double xf2 = ring->
GetXF2();
61 double yf2 = ring->
GetYF2();
65 for (
int iHit = 0; iHit < nofHits; iHit++) {
69 double d1 =
sqrt((
x - xf1) * (
x - xf1) + (
y - yf1) * (
y - yf1));
70 double d2 =
sqrt((
x - xf2) * (
x - xf2) + (
y - yf2) * (
y - yf2));
72 chi2 += (d1 + d2 - 2. * axisA) * (d1 + d2 - 2. * axisA);
100 for (
int iHit = 0; iHit < nofHits; iHit++) {
104 double d1 =
fabs(A *
x *
x + B *
x *
y + C *
y *
y + D *
x + E *
y + F);
106 sqrt(pow(2 * A *
x + B *
y + D, 2) + pow(B *
x + 2 * C *
y + E, 2));
108 chi2 += (d1 * d1) / (d2 * d2);
virtual void CalcChi2(CbmRichRingLight *ring)
Calculate chi2 of the ellipse fit.
friend F32vec4 sqrt(const F32vec4 &a)
Base class for concrete ellipse fitting algorithms. Each derived class must implement the method DoFi...
double GetYF2() const
Calculate and return Y coordinate of the second focus.
int GetNofHits() const
Return number of hits in ring.
double GetXF2() const
Calculate and return X coordinate of the second focus.
Abstract base class for concrete Rich Ring fitting algorithms. Each derived class must implement the ...
double GetXF1() const
Calculate and return X coordinate of the first focus.
virtual void CalcChi2(double A, double B, double C, double D, double E, double F, CbmRichRingLight *ring)
Calculate chi2 of the ellipse fitting using parameters of 2D curve.
Abstract base class for concrete Rich Ring fitting algorithms. Each derived class must implement the ...
friend F32vec4 fabs(const F32vec4 &a)
CbmRichHitLight GetHit(int ind)
Return hit by the index.
double GetYF1() const
Calculate and return Y coordinate of the first focus.
virtual ~CbmRichRingFitterEllipseBase()
Destructor.
CbmRichRingFitterEllipseBase()
Default constructor.