77 if (nHits < 4)
return 999.f;
79 float Pi = 3.14159265;
80 float TwoPi = 2. * 3.14159265;
85 for (
int iH = 0; iH < nHits; iH++) {
90 if (yHit - yRing == 0 || xHit - xRing == 0)
continue;
94 fAlpha[iH] = atan(fabs((yHit - yRing) / (xHit - xRing)));
97 fAlpha[iH] = TwoPi - atan(fabs((yHit - yRing) / (xHit - xRing)));
102 fAlpha[iH] = Pi - atan(fabs((yHit - yRing) / (xHit - xRing)));
105 fAlpha[iH] = Pi + atan(fabs((yHit - yRing) / (xHit - xRing)));
112 for (
int i = 0; i < nHits - 1; i++)
115 sort(
fPhi.begin(),
fPhi.begin() + nHits);
117 float angle =
fPhi[nHits - 1] +
fPhi[nHits - 2] +
fPhi[nHits - 3];