15 #include "FairLogger.h"
16 #include "TClonesArray.h"
17 #include "TStopwatch.h"
26 : fNEvent(0), fRingCount(0), fHTImpl(NULL), fUseAnnSelect(true) {
45 TClonesArray* rRingArray) {
49 LOG(info) <<
"-I- CbmRichRingFinderHough Event/Timeslice no. " <<
fNEvent;
51 vector<CbmRichHoughHit> UpH;
52 vector<CbmRichHoughHit> DownH;
55 if (NULL == rHitArray) {
56 LOG(error) <<
"-E- CbmRichRingFinderHough::DoFind: Hit array missing!"
60 const Int_t nhits = rHitArray->GetEntriesFast();
62 LOG(error) <<
"-E- CbmRichRingFinderHough::DoFind: No hits in this event!";
66 UpH.reserve(nhits / 2);
67 DownH.reserve(nhits / 2);
71 for (Int_t iHit = 0; iHit < nhits; iHit++) {
83 UpH.push_back(tempPoint);
85 DownH.push_back(tempPoint);
90 Double_t dt1 = timer.RealTime();
93 LOG(debug) <<
"-I- CbmRichRingFinderHough nofHits Up:" << UpH.size();
97 if (rRingArray != NULL)
103 Double_t dt2 = timer.RealTime();
106 LOG(debug) <<
"-I- CbmRichRingFinderHough nofHits Down:" << DownH.size();
109 if (rRingArray != NULL)
114 Double_t dt3 = timer.RealTime();
116 LOG(info) <<
"CbmRichRingFinderHough. Number of found rings "
117 << rRingArray->GetEntriesFast();
119 LOG(info) <<
"time1:" << dt1 <<
" time2:" << dt2 <<
" time3:" << dt3
120 <<
" total:" << dt1 + dt2 + dt3;
126 TClonesArray* rRingArray,
127 TClonesArray* rHitArray,
128 const vector<CbmRichRingLight*>&
rings) {
129 for (UInt_t iRing = 0; iRing <
rings.size(); iRing++) {
130 if (
rings[iRing]->GetRecFlag() == -1)
continue;
132 double ringTime = 0.;
133 Int_t ringCounter = 0;
135 for (Int_t iH = 0; iH <
rings[iRing]->GetNofHits(); iH++) {
136 Int_t hitId =
rings[iRing]->GetHitId(iH);
139 if (hit !=
nullptr) {
144 r->
SetTime(ringTime / (
double) ringCounter);