diff --git a/reco/detectors/rich/CbmRichReconstruction.cxx b/reco/detectors/rich/CbmRichReconstruction.cxx index d13ed49aa18cc19d8f696ab3a1061e80ac2a3db8..3924fa3a55e912132131eafe60c5819de347177a 100644 --- a/reco/detectors/rich/CbmRichReconstruction.cxx +++ b/reco/detectors/rich/CbmRichReconstruction.cxx @@ -191,6 +191,7 @@ void CbmRichReconstruction::InitFinder() if (fFinderName == "hough") { fRingFinder = new CbmRichRingFinderHough(); static_cast<CbmRichRingFinderHough*>(fRingFinder)->SetUseAnnSelect(fUseHTAnnSelect); + static_cast<CbmRichRingFinderHough*>(fRingFinder)->SetUseSubdivide(fUseHTSubdivide); } else if (fFinderName == "ideal") { fRingFinder = new CbmRichRingFinderIdeal(); diff --git a/reco/detectors/rich/CbmRichReconstruction.h b/reco/detectors/rich/CbmRichReconstruction.h index d2b6626b7a4b99c2e7a28843018d047e1ccfe074..70b2b69a0bd8edc06b3835af2dbcbae74c98b764 100644 --- a/reco/detectors/rich/CbmRichReconstruction.h +++ b/reco/detectors/rich/CbmRichReconstruction.h @@ -77,6 +77,7 @@ public: void SetTrackAssignName(const string& n) { fTrackAssignName = n; } void SetUseHTAnnSelect(bool select) { fUseHTAnnSelect = select; } + void SetUseHTSubdivide(bool select) { fUseHTSubdivide = select; } /** * \brief Set Z coordinate where STS tracks will be extrapolated. @@ -90,6 +91,7 @@ public: this->SetRunProjection(false); this->SetRunTrackAssign(false); this->SetUseHTAnnSelect(false); + this->SetUseHTSubdivide(false); } private: @@ -125,6 +127,9 @@ private: // Run ring-candidate selection algorithm based on ANN bool fUseHTAnnSelect = true; + // Subdivide the RICH plain at y=0 to run both parts in parallel + bool fUseHTSubdivide = true; + // Algorithm names for each step of reconstruction. string fExtrapolationName = "littrack"; string fProjectionName = "analytical"; diff --git a/reco/detectors/rich/finder/CbmRichRingFinderHough.cxx b/reco/detectors/rich/finder/CbmRichRingFinderHough.cxx index e1e1f78413af6ba55de131973bc118bc66a78cc3..d0474d45b00eb286b44b6baf595f162d8f88db91 100644 --- a/reco/detectors/rich/finder/CbmRichRingFinderHough.cxx +++ b/reco/detectors/rich/finder/CbmRichRingFinderHough.cxx @@ -69,8 +69,13 @@ Int_t CbmRichRingFinderHough::DoFind(CbmEvent* event, TClonesArray* rHitArray, T return -1; } - UpH.reserve(nofRichHits / 2); - DownH.reserve(nofRichHits / 2); + if (fUseSubdivide) { + UpH.reserve(nofRichHits / 2); + DownH.reserve(nofRichHits / 2); + } + else { + UpH.reserve(nofRichHits); + } // convert CbmRichHit to CbmRichHoughHit and // sort hits according to the photodetector (up or down) @@ -85,7 +90,7 @@ Int_t CbmRichRingFinderHough::DoFind(CbmEvent* event, TClonesArray* rHitArray, T tempPoint.fX2plusY2 = hit->GetX() * hit->GetX() + hit->GetY() * hit->GetY(); tempPoint.fTime = hit->GetTime(); tempPoint.fIsUsed = false; - if (hit->GetY() >= 0) UpH.push_back(tempPoint); + if (hit->GetY() >= 0 || !fUseSubdivide) UpH.push_back(tempPoint); else DownH.push_back(tempPoint); } diff --git a/reco/detectors/rich/finder/CbmRichRingFinderHough.h b/reco/detectors/rich/finder/CbmRichRingFinderHough.h index 4a2a5d472dae38b83468982f67acd97b4d22616d..73dfe9c22efde1eb03ed4fdfbd182eff3917b4eb 100644 --- a/reco/detectors/rich/finder/CbmRichRingFinderHough.h +++ b/reco/detectors/rich/finder/CbmRichRingFinderHough.h @@ -60,10 +60,12 @@ public: virtual Int_t DoFind(CbmEvent* event, TClonesArray* rHitArray, TClonesArray* rProjArray, TClonesArray* rRingArray); void SetUseAnnSelect(bool use) { fUseAnnSelect = use; } + void SetUseSubdivide(bool use) { fUseSubdivide = use; } private: Int_t fEventNum = 0; Bool_t fUseAnnSelect = true; + Bool_t fUseSubdivide = true; // choose between serial and SIMD implementation of the ring finder #ifdef HOUGH_SERIAL