Skip to content
Snippets Groups Projects
Commit 4585ae97 authored by Martin Beyer's avatar Martin Beyer Committed by Florian Uhlig
Browse files

add subdivide option to the RICH hough finder

parent aee14091
No related branches found
No related tags found
1 merge request!764add subdivide option to the RICH hough finder
Pipeline #16527 passed
......@@ -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();
......
......@@ -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";
......
......@@ -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);
}
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment