8 #ifndef CBMRICHRINGSELECTIMPLLIGHT_H_
9 #define CBMRICHRINGSELECTIMPLLIGHT_H_
42 for (
int iH = 0; iH < nHits; iH++) {
46 float r = sqrt(rx * rx + ry * ry) - ring->
GetRadius();
47 if (r < 0.35f) count++;
56 if (nHits < 4)
return 999.f;
58 register float Pi = 3.14159265;
59 register float TwoPi = 2.*3.14159265;
62 register float xHit, yHit;
64 for(
int iH = 0; iH < nHits; iH++){
69 if (yHit-yRing == 0 || xHit-xRing == 0)
continue;
73 fAlpha[iH] = atan(fabs((yHit-yRing)/(xHit-xRing)));
75 fAlpha[iH] = TwoPi - atan(fabs((yHit-yRing)/(xHit-xRing)));
79 fAlpha[iH] = Pi - atan(fabs((yHit-yRing)/(xHit-xRing)));
81 fAlpha[iH] = Pi + atan(fabs((yHit-yRing)/(xHit-xRing)));
90 sort(
fPhi.begin(),
fPhi.begin()+nHits);