77 if (nofTracks <= 0 || nofRings <= 0)
return;
79 vector<Int_t> trackIndex;
80 vector<Double_t> trackDist;
81 trackIndex.resize(nofRings);
82 trackDist.resize(nofRings);
83 for (UInt_t i = 0; i < trackIndex.size(); i++) {
88 for (Int_t iIter = 0; iIter < 4; iIter++) {
89 for (Int_t iR0 = 0; iR0 < nofRings; iR0++) {
92 if (trackIndex[iR0] != -1)
continue;
94 if (ring ==
nullptr)
continue;
100 Int_t iTrackMin = -1;
102 for (Int_t iT0 = 0; iT0 < nofTracks; iT0++) {
105 vector<Int_t>::iterator it = find(trackIndex.begin(), trackIndex.end(), iT);
106 if (it != trackIndex.end())
continue;
108 FairTrackParam* track =
static_cast<FairTrackParam*
>(
richProj->At(iT));
109 Double_t xTrack = track->GetX();
110 Double_t yTrack = track->GetY();
112 if (xTrack == 0 && yTrack == 0)
continue;
116 Double_t dist = TMath::Sqrt((xRing - xTrack) * (xRing - xTrack) + (yRing - yTrack) * (yRing - yTrack));
123 trackIndex[iR0] = iTrackMin;
124 trackDist[iR0] = rMin;
127 for (UInt_t i1 = 0; i1 < trackIndex.size(); i1++) {
128 for (UInt_t i2 = 0; i2 < trackIndex.size(); i2++) {
129 if (i1 == i2)
continue;
130 if (trackIndex[i1] == trackIndex[i2] && trackIndex[i1] != -1) {
131 if (trackDist[i1] >= trackDist[i2]) {
132 trackDist[i1] = 999.;
136 trackDist[i2] = 999.;
145 for (UInt_t i = 0; i < trackIndex.size(); i++) {
148 if (trackIndex[i] == -1)
continue;
159 if (nofTracks <= 0 || nofRings <= 0)
return;
160 for (Int_t iT0 = 0; iT0 < nofTracks; iT0++) {
166 FairTrackParam* track =
static_cast<FairTrackParam*
>(
richProj->At(iT));
167 Double_t xTrack = track->GetX();
168 Double_t yTrack = track->GetY();
169 if (xTrack == 0 && yTrack == 0)
continue;
171 Double_t rMin = 999.;
173 for (Int_t iR0 = 0; iR0 < nofRings; iR0++) {
176 if (ring ==
nullptr)
continue;
181 Double_t dist = TMath::Sqrt((xRing - xTrack) * (xRing - xTrack) + (yRing - yTrack) * (yRing - yTrack));
187 if (iRingMin < 0)
continue;