10 #ifndef CBM_RICH_RING_SELECT_IMPL
11 #define CBM_RICH_RING_SELECT_IMPL
53 for (
int iH = 0; iH < nHits; iH++) {
58 if (r < 0.35
f) count++;
70 if (nHits < 4)
return 999.f;
72 float Pi = 3.14159265;
73 float TwoPi = 2. * 3.14159265;
78 for (
int iH = 0; iH < nHits; iH++) {
83 if (yHit - yRing == 0 || xHit - xRing == 0)
continue;
87 fAlpha[iH] = atan(
fabs((yHit - yRing) / (xHit - xRing)));
89 fAlpha[iH] = TwoPi - atan(
fabs((yHit - yRing) / (xHit - xRing)));
93 fAlpha[iH] =
Pi - atan(
fabs((yHit - yRing) / (xHit - xRing)));
95 fAlpha[iH] =
Pi + atan(
fabs((yHit - yRing) / (xHit - xRing)));
102 for (
int i = 0;
i < nHits - 1;
i++)
105 sort(
fPhi.begin(),
fPhi.begin() + nHits);
107 float angle =
fPhi[nHits - 1] +
fPhi[nHits - 2] +
fPhi[nHits - 3];