CbmRoot
Loading...
Searching...
No Matches
CbmRichRingFinderHoughImpl Class Reference

Ring finder implementation based on Hough Transform method. More...

#include <CbmRichRingFinderHoughImpl.h>

Inheritance diagram for CbmRichRingFinderHoughImpl:
[legend]
Collaboration diagram for CbmRichRingFinderHoughImpl:
[legend]

Public Member Functions

 CbmRichRingFinderHoughImpl ()
 Standard constructor.
 
virtual ~CbmRichRingFinderHoughImpl ()
 Distructor.
 
void SetParameters ()
 Set parameters of the algorithm.
 
void CalculateRingParameters (float x[], float y[], float *xc, float *yc, float *r)
 Calculate circle center and radius.
 
virtual void HoughTransformReconstruction ()
 Run HT for each hit.
 
virtual void DefineLocalAreaAndHits (float x0, float y0, int *indmin, int *indmax)
 Find hits in a local area.
 
virtual void HoughTransform (unsigned int indmin, unsigned int indmax)
 Run HoughTransformGroup for each group of hits.
 
virtual void HoughTransformGroup (unsigned int indmin, unsigned int indmax, int iPart)
 
void FindPeak (int indmin, int indmax)
 
void RingSelection ()
 Ring selection procedure.
 
void ReAssignSharedHits (int ringInd1, int ringInd2)
 Reassign shared hits from two rings to only one of the rings.
 
int GetHitIndexById (unsigned int hitId)
 Return hit indez in the internal Array.
 
void RemoveHitsAroundRing (int indmin, int indmax, CbmRichRingLight *ring)
 Set fIsUsed flag to true for hits attached to the ring.
 
void Init ()
 
void DoFind ()
 Start point to run algorithm.
 
void SetData (const vector< CbmRichHoughHit > &data)
 Set array of hits.
 
vector< CbmRichRingLight * > & GetFoundRings ()
 Return vector of found rings.
 
void SetUseAnnSelect (bool use)
 

Protected Attributes

unsigned short fNofParts
 
float fMaxDistance
 
float fMinDistance
 
float fMinDistanceSq
 
float fMaxDistanceSq
 
float fMinRadius
 
float fMaxRadius
 
float fDx
 
float fDy
 
float fDr
 
unsigned short fNofBinsX
 
unsigned short fNofBinsY
 
unsigned short fNofBinsXY
 
unsigned short fHTCut
 
unsigned short fNofBinsR
 
unsigned short fHTCutR
 
unsigned short fMinNofHitsInArea
 
float fRmsCoeffEl
 
float fMaxCutEl
 
float fRmsCoeffCOP
 
float fMaxCutCOP
 
float fAnnCut
 
float fUsedHitsAllCut
 
double fTimeCut
 
float fCurMinX
 
float fCurMinY
 
bool fUseAnnSelect
 
vector< CbmRichHoughHitfData
 
vector< unsigned short > fHist
 
vector< unsigned short > fHistR
 
vector< vector< unsigned int > > fHitInd
 
vector< CbmRichRingLight * > fFoundRings
 
CbmRichRingFitterCOPfFitCOP
 
CbmRichRingSelectAnnfANNSelect
 
double fCurTime
 

Static Protected Attributes

static const unsigned short MAX_NOF_HITS = 65000
 

Private Member Functions

 CbmRichRingFinderHoughImpl (const CbmRichRingFinderHoughImpl &)
 Copy constructor.
 
CbmRichRingFinderHoughImploperator= (const CbmRichRingFinderHoughImpl &)
 Assignment operator.
 

Detailed Description

Ring finder implementation based on Hough Transform method.

Author
Semen Lebedev
Date
2008

Definition at line 37 of file CbmRichRingFinderHoughImpl.h.

Constructor & Destructor Documentation

◆ CbmRichRingFinderHoughImpl() [1/2]

CbmRichRingFinderHoughImpl::CbmRichRingFinderHoughImpl ( )

Standard constructor.

Definition at line 31 of file CbmRichRingFinderHoughImpl.cxx.

◆ ~CbmRichRingFinderHoughImpl()

CbmRichRingFinderHoughImpl::~CbmRichRingFinderHoughImpl ( )
virtual

Distructor.

Definition at line 97 of file CbmRichRingFinderHoughImpl.cxx.

References fANNSelect, and fFitCOP.

◆ CbmRichRingFinderHoughImpl() [2/2]

CbmRichRingFinderHoughImpl::CbmRichRingFinderHoughImpl ( const CbmRichRingFinderHoughImpl & )
private

Copy constructor.

Member Function Documentation

◆ CalculateRingParameters()

void CbmRichRingFinderHoughImpl::CalculateRingParameters ( float x[],
float y[],
float * xc,
float * yc,
float * r )

Calculate circle center and radius.

Parameters
[in]x[]Array of 3 X coordinates.
[in]y[]Array of 3 Y coordinates.
[out]xcX coordinate of the ring center.
[out]ycY coordinate of the ring center.
[out]rRing radius.

Definition at line 525 of file CbmRichRingFinderHoughImpl.cxx.

References sqrt(), x, and y.

◆ DefineLocalAreaAndHits()

void CbmRichRingFinderHoughImpl::DefineLocalAreaAndHits ( float x0,
float y0,
int * indmin,
int * indmax )
virtual

Find hits in a local area.

Parameters
[in]x0X coordinate of the local area center.
[in]y0Y coordinate of the local area center.
[out]indminMinimum index of the hit in local area.
[out]indmaxMaximum index of the hit in local area.

Definition at line 188 of file CbmRichRingFinderHoughImpl.cxx.

References fCurTime, fData, fHist, fHistR, CbmRichHoughHit::fHit, fHitInd, fMaxDistance, fMaxDistanceSq, fMinNofHitsInArea, fNofBinsR, fNofBinsXY, fNofParts, fTimeCut, and CbmRichHitLight::fX.

Referenced by HoughTransformReconstruction(), and CbmRichRingFinderHoughSimd::HoughTransformReconstruction().

◆ DoFind()

void CbmRichRingFinderHoughImpl::DoFind ( )

Start point to run algorithm.

Definition at line 118 of file CbmRichRingFinderHoughImpl.cxx.

References fData, fFoundRings, HoughTransformReconstruction(), and RingSelection().

Referenced by CbmRichRingFinderHough::DoFind().

◆ FindPeak()

◆ GetFoundRings()

vector< CbmRichRingLight * > & CbmRichRingFinderHoughImpl::GetFoundRings ( )
inline

Return vector of found rings.

Definition at line 203 of file CbmRichRingFinderHoughImpl.h.

References fFoundRings.

Referenced by CbmRichRingFinderHough::DoFind().

◆ GetHitIndexById()

int CbmRichRingFinderHoughImpl::GetHitIndexById ( unsigned int hitId)

Return hit indez in the internal Array.

Parameters
[in]hitIndIndex in TClonesArray.

Definition at line 516 of file CbmRichRingFinderHoughImpl.cxx.

References fData, and size().

Referenced by ReAssignSharedHits().

◆ HoughTransform()

void CbmRichRingFinderHoughImpl::HoughTransform ( unsigned int indmin,
unsigned int indmax )
virtual

Run HoughTransformGroup for each group of hits.

Parameters
[in]indminMinimum index of the hit in local area.
[in]indmaxMaximum index of the hit in local area.

Definition at line 236 of file CbmRichRingFinderHoughImpl.cxx.

References fNofParts, and HoughTransformGroup().

Referenced by HoughTransformReconstruction(), and CbmRichRingFinderHoughSimd::HoughTransformReconstruction().

◆ HoughTransformGroup()

void CbmRichRingFinderHoughImpl::HoughTransformGroup ( unsigned int indmin,
unsigned int indmax,
int iPart )
virtual
\brief Main procedure for Hough Transform.
\param[in] indmin Minimum index of the hit in local area.
Parameters
[in]indmaxMaximum index of the hit in local area.
[in]iPartIndex of the hit group.

Definition at line 243 of file CbmRichRingFinderHoughImpl.cxx.

References fCurMinX, fCurMinY, fData, fDr, fDx, fDy, fHist, fHistR, fHitInd, fMaxDistanceSq, fNofBinsR, fNofBinsX, fNofBinsY, fTimeCut, and sqrt().

Referenced by HoughTransform().

◆ HoughTransformReconstruction()

void CbmRichRingFinderHoughImpl::HoughTransformReconstruction ( )
virtual

Run HT for each hit.

Reimplemented in CbmRichRingFinderHoughSimd.

Definition at line 171 of file CbmRichRingFinderHoughImpl.cxx.

References DefineLocalAreaAndHits(), fCurMinX, fCurMinY, fCurTime, fData, FindPeak(), fMaxDistance, HoughTransform(), and size().

Referenced by DoFind().

◆ Init()

void CbmRichRingFinderHoughImpl::Init ( )

◆ operator=()

CbmRichRingFinderHoughImpl & CbmRichRingFinderHoughImpl::operator= ( const CbmRichRingFinderHoughImpl & )
private

Assignment operator.

◆ ReAssignSharedHits()

void CbmRichRingFinderHoughImpl::ReAssignSharedHits ( int ringInd1,
int ringInd2 )

Reassign shared hits from two rings to only one of the rings.

Parameters
[in,out]ringInd1Index of the first ring.
[in,out]ringInd2Index of the second ring.

Definition at line 483 of file CbmRichRingFinderHoughImpl.cxx.

References fData, fFoundRings, CbmRichRingLight::GetCenterX(), CbmRichRingLight::GetCenterY(), CbmRichRingLight::GetHitId(), GetHitIndexById(), CbmRichRingLight::GetNofHits(), CbmRichRingLight::GetRadius(), CbmRichRingLight::RemoveHit(), and sqrt().

Referenced by RingSelection().

◆ RemoveHitsAroundRing()

void CbmRichRingFinderHoughImpl::RemoveHitsAroundRing ( int indmin,
int indmax,
CbmRichRingLight * ring )

Set fIsUsed flag to true for hits attached to the ring.

Parameters
[in]indminMinimum index of the hit in local area.
[in]indmaxMaximum index of the hit in local area.
[in]ringFound ring.

Definition at line 421 of file CbmRichRingFinderHoughImpl.cxx.

References fCurTime, fData, fMaxCutEl, fRmsCoeffEl, fTimeCut, CbmRichRingLight::GetCenterX(), CbmRichRingLight::GetCenterY(), CbmRichRingLight::GetChi2(), CbmRichRingLight::GetNofHits(), CbmRichRingLight::GetRadius(), and sqrt().

Referenced by FindPeak().

◆ RingSelection()

void CbmRichRingFinderHoughImpl::RingSelection ( )

◆ SetData()

void CbmRichRingFinderHoughImpl::SetData ( const vector< CbmRichHoughHit > & data)
inline

Set array of hits.

Parameters
[in]dataArray of hits.

Definition at line 194 of file CbmRichRingFinderHoughImpl.h.

References fData.

Referenced by CbmRichRingFinderHough::DoFind().

◆ SetParameters()

void CbmRichRingFinderHoughImpl::SetParameters ( )

◆ SetUseAnnSelect()

void CbmRichRingFinderHoughImpl::SetUseAnnSelect ( bool use)
inline

Definition at line 205 of file CbmRichRingFinderHoughImpl.h.

References fUseAnnSelect.

Referenced by CbmRichRingFinderHough::Init().

Member Data Documentation

◆ fAnnCut

float CbmRichRingFinderHoughImpl::fAnnCut
protected

Definition at line 72 of file CbmRichRingFinderHoughImpl.h.

Referenced by FindPeak(), and SetParameters().

◆ fANNSelect

CbmRichRingSelectAnn* CbmRichRingFinderHoughImpl::fANNSelect
protected

Definition at line 88 of file CbmRichRingFinderHoughImpl.h.

Referenced by FindPeak(), Init(), and ~CbmRichRingFinderHoughImpl().

◆ fCurMinX

◆ fCurMinY

◆ fCurTime

double CbmRichRingFinderHoughImpl::fCurTime
protected

◆ fData

◆ fDr

float CbmRichRingFinderHoughImpl::fDr
protected

◆ fDx

float CbmRichRingFinderHoughImpl::fDx
protected

◆ fDy

float CbmRichRingFinderHoughImpl::fDy
protected

◆ fFitCOP

CbmRichRingFitterCOP* CbmRichRingFinderHoughImpl::fFitCOP
protected

Definition at line 87 of file CbmRichRingFinderHoughImpl.h.

Referenced by FindPeak(), Init(), and ~CbmRichRingFinderHoughImpl().

◆ fFoundRings

vector<CbmRichRingLight*> CbmRichRingFinderHoughImpl::fFoundRings
protected

◆ fHist

vector<unsigned short> CbmRichRingFinderHoughImpl::fHist
protected

◆ fHistR

vector<unsigned short> CbmRichRingFinderHoughImpl::fHistR
protected

◆ fHitInd

vector<vector<unsigned int> > CbmRichRingFinderHoughImpl::fHitInd
protected

◆ fHTCut

unsigned short CbmRichRingFinderHoughImpl::fHTCut
protected

Definition at line 60 of file CbmRichRingFinderHoughImpl.h.

Referenced by FindPeak(), and SetParameters().

◆ fHTCutR

unsigned short CbmRichRingFinderHoughImpl::fHTCutR
protected

Definition at line 63 of file CbmRichRingFinderHoughImpl.h.

Referenced by FindPeak(), and SetParameters().

◆ fMaxCutCOP

float CbmRichRingFinderHoughImpl::fMaxCutCOP
protected

Definition at line 70 of file CbmRichRingFinderHoughImpl.h.

Referenced by FindPeak(), and SetParameters().

◆ fMaxCutEl

float CbmRichRingFinderHoughImpl::fMaxCutEl
protected

Definition at line 68 of file CbmRichRingFinderHoughImpl.h.

Referenced by RemoveHitsAroundRing(), and SetParameters().

◆ fMaxDistance

float CbmRichRingFinderHoughImpl::fMaxDistance
protected

◆ fMaxDistanceSq

float CbmRichRingFinderHoughImpl::fMaxDistanceSq
protected

◆ fMaxRadius

float CbmRichRingFinderHoughImpl::fMaxRadius
protected

Definition at line 51 of file CbmRichRingFinderHoughImpl.h.

Referenced by SetParameters().

◆ fMinDistance

float CbmRichRingFinderHoughImpl::fMinDistance
protected

Definition at line 46 of file CbmRichRingFinderHoughImpl.h.

Referenced by SetParameters().

◆ fMinDistanceSq

float CbmRichRingFinderHoughImpl::fMinDistanceSq
protected

◆ fMinNofHitsInArea

unsigned short CbmRichRingFinderHoughImpl::fMinNofHitsInArea
protected

◆ fMinRadius

float CbmRichRingFinderHoughImpl::fMinRadius
protected

Definition at line 50 of file CbmRichRingFinderHoughImpl.h.

Referenced by SetParameters().

◆ fNofBinsR

unsigned short CbmRichRingFinderHoughImpl::fNofBinsR
protected

◆ fNofBinsX

unsigned short CbmRichRingFinderHoughImpl::fNofBinsX
protected

◆ fNofBinsXY

unsigned short CbmRichRingFinderHoughImpl::fNofBinsXY
protected

◆ fNofBinsY

unsigned short CbmRichRingFinderHoughImpl::fNofBinsY
protected

Definition at line 57 of file CbmRichRingFinderHoughImpl.h.

Referenced by HoughTransformGroup(), and SetParameters().

◆ fNofParts

unsigned short CbmRichRingFinderHoughImpl::fNofParts
protected

◆ fRmsCoeffCOP

float CbmRichRingFinderHoughImpl::fRmsCoeffCOP
protected

Definition at line 69 of file CbmRichRingFinderHoughImpl.h.

Referenced by FindPeak(), and SetParameters().

◆ fRmsCoeffEl

float CbmRichRingFinderHoughImpl::fRmsCoeffEl
protected

Definition at line 67 of file CbmRichRingFinderHoughImpl.h.

Referenced by RemoveHitsAroundRing(), and SetParameters().

◆ fTimeCut

double CbmRichRingFinderHoughImpl::fTimeCut
protected

◆ fUseAnnSelect

bool CbmRichRingFinderHoughImpl::fUseAnnSelect
protected

Definition at line 80 of file CbmRichRingFinderHoughImpl.h.

Referenced by FindPeak(), Init(), and SetUseAnnSelect().

◆ fUsedHitsAllCut

float CbmRichRingFinderHoughImpl::fUsedHitsAllCut
protected

Definition at line 73 of file CbmRichRingFinderHoughImpl.h.

Referenced by RingSelection(), and SetParameters().

◆ MAX_NOF_HITS

const unsigned short CbmRichRingFinderHoughImpl::MAX_NOF_HITS = 65000
staticprotected

Definition at line 40 of file CbmRichRingFinderHoughImpl.h.


The documentation for this class was generated from the following files: