10 #ifndef CBM_RICH_RING_SELECT_IMPL
11 #define CBM_RICH_RING_SELECT_IMPL
18 #include "CbmRichRingLight.h"
60 for (
int iH = 0; iH < nHits; iH++) {
64 float r = sqrt(rx * rx + ry * ry) - ring->
GetRadius();
65 if (r < 0.35f) count++;
79 if (nHits < 4)
return 999.f;
81 float Pi = 3.14159265;
82 float TwoPi = 2.*3.14159265;
87 for(
int iH = 0; iH < nHits; iH++){
92 if (yHit-yRing == 0 || xHit-xRing == 0)
continue;
96 fAlpha[iH] = atan(fabs((yHit-yRing)/(xHit-xRing)));
98 fAlpha[iH] = TwoPi - atan(fabs((yHit-yRing)/(xHit-xRing)));
102 fAlpha[iH] = Pi - atan(fabs((yHit-yRing)/(xHit-xRing)));
104 fAlpha[iH] = Pi + atan(fabs((yHit-yRing)/(xHit-xRing)));
113 sort(
fPhi.begin(),
fPhi.begin()+nHits);
115 float angle =
fPhi[nHits-1]+
fPhi[nHits-2]+
fPhi[nHits-3];