94 Double_t sigmaError = 0.2;
103 for (Int_t iR = 0; iR < 50000; iR++) {
105 ellipse.
SetXYABP(X0, Y0, A, B, phi);
106 for (Int_t iH = 0; iH < nofHits; iH++) {
107 Double_t alfa = gRandom->Rndm() * 2. * TMath::Pi();
109 Double_t errorX = gRandom->Gaus(0, sigmaError);
110 Double_t errorY = gRandom->Gaus(0, sigmaError);
112 Double_t hx = A *
cos(alfa);
113 Double_t hy = B *
sin(alfa);
115 Double_t hitXRot = hx *
cos(phi) - hy *
sin(phi);
116 Double_t hitYRot = hx *
sin(phi) + hy *
cos(phi);
122 fitEllipse->
DoFit(&ellipse);
135 fitCircle->
DoFit(&ellipse);
138 Double_t mcR = (A + B) / 2.;
151 cout << nofBadFit << endl;
217 for (Int_t i = 0; i < 3; i++) {
220 for (Int_t j = 0; j < 3; j++) {
229 for (Int_t iHit = 0; iHit < ring->
GetNofHits(); iHit++) {
230 Double_t xi = ring->
GetHit(iHit).
fX;
231 Double_t yi = ring->
GetHit(iHit).
fY;
232 Double_t ri =
sqrt((xi - xc) * (xi - xc) + (yi - yc) * (yi - yc));
233 Double_t err = sigma;
235 Double_t f1 = (-1.0 * (xi - xc)) / (ri * err);
236 Double_t f2 = (-1.0 * (yi - yc)) / (ri * err);
237 Double_t f3 = (-1.) / err;
238 Double_t Y = (R - ri) / err;
240 cov(0, 0) = cov(0, 0) + f1 * f1;
241 cov(0, 1) = cov(0, 1) + f1 * f2;
242 cov(0, 2) = cov(0, 2) + f1 * f3;
244 cov(1, 0) = cov(0, 1);
245 cov(1, 1) = cov(1, 1) + f2 * f2;
246 cov(1, 2) = cov(1, 2) + f2 * f3;
248 cov(2, 0) = cov(0, 2);
249 cov(2, 1) = cov(1, 2);
250 cov(2, 2) = cov(2, 2) + f3 * f3;
252 HY3(0, 0) = HY3(0, 0) + Y * f1;
253 HY3(1, 0) = HY3(1, 0) + Y * f2;
254 HY3(2, 0) = HY3(2, 0) + Y * f3;