#include "hrichringfind.h" |
HRichRingFind
class description - source file - inheritance tree (.pdf)
protected:
Double_t HomogenDistr(Double_t left, Double_t right)
public:
HRichRingFind()
HRichRingFind(const HRichRingFind& source)
virtual ~HRichRingFind()
Float_t CalcDistance(const HRichHit& ring1, const HRichHit& ring2)
Float_t CalcDistance(Int_t x, Int_t y, const HRichHit& ring)
Float_t CalcDistance(Int_t x1, Int_t y1, Int_t x2, Int_t y2)
virtual void CalcFakeContribution(HRichAnalysis* showMe)
void CalcRingClusters(HRichAnalysis* showYou, Int_t* dumpArr, Int_t ringNr, Int_t nowX, Int_t nowY)
virtual void CalcRingParameters(HRichAnalysis* showMe, HRichHit* pHit)
static TClass* Class()
void CloseMaxRejection(TList* hitList)
Int_t Execute(HRichAnalysis* giveMe)
Int_t GetAlgorithmNr(HRichAnalysis* showMe)
Bool_t init(HRichAnalysis*)
virtual TClass* IsA() const
Int_t MatchRings(HRichAnalysis* showMe, TList* hitList1, TList* hitList2)
void MaxAnalysis(HRichAnalysis* showMe, TList* hitList, TArrayI* in, TArrayI* out, Int_t minAmpl)
void MaxCluster(HRichAnalysis* showYou, TArrayI* in, TArrayI* out, Int_t nowPad, Int_t maxCode, Int_t minAmpl)
void MaxFinding(HRichAnalysis* showYou, TList* hitList, TArrayI* in, TArrayI* out, Int_t ringnr, Float_t distance)
Int_t MaxLabAmpl(TList* hitList, Int_t maxCode)
void MaxMarker(HRichAnalysis* showYou, TArrayI* in, TArrayI* out, Int_t nowPad, Int_t maxCode)
void MaxSelector(HRichAnalysis* showMe, TList* hitList, TArrayI* in, TArrayI* out)
HRichRingFind& operator=(const HRichRingFind& source)
void RingFindFitMatrix(HRichAnalysis* showMe, Int_t minampl, Int_t distance, Int_t howmanyrings = 5)
void RingFindHoughTransf(HRichAnalysis* showMe, Int_t minampl, Int_t distance, Int_t howmanyrings = 5)
virtual void ShowMembers(TMemberInspector& insp, char* parent)
virtual void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
Bool_t TestAsymmetry(HRichAnalysis* showYou, HRichHit* pHit, Int_t amplit)
Bool_t TestBorder(HRichAnalysis* showYou, HRichHit* pHit, Int_t amplit)
Bool_t TestDensity(HRichAnalysis* showYou, HRichHit* pHit)
Bool_t TestDynamic(HRichAnalysis* showYou, HRichHit* pHit, Int_t amplit)
Bool_t TestRatio(HRichAnalysis* showYou, HRichHit* pHit)
Int_t TestRing(HRichAnalysis* showYou, HRichHit* hit, Int_t amplit)
Bool_t TestRingCharge(HRichHit* hit)
protected:
HRichAnalysisPar* pAnalysisParams
HRichGeometryPar* pGeometryParams
Int_t iInnerCount
Int_t iInnerPhot4
Int_t iInnerPhot8
Float_t fClusterSize
Float_t fClusterLMax4
Float_t fClusterLMax8
Int_t iRingImageSize
TArrayI iRingTempImage
Float_t xMeanMax
Float_t yMeanMax
Float_t xPadMeanMax
Float_t yPadMeanMax
Float_t thetaMeanMax
Float_t phiMeanMax
Int_t fMaxClusterSize
Int_t fMaxClusterSum
Int_t fMaxThrClusterSize
Int_t iCount
Int_t iHitCount
Int_t maxCols
Int_t maxRows
Int_t iMatrixSize
Int_t iMatrixHalfSize
Int_t ly_from
Int_t ly_to
Int_t lx_from
Int_t lx_to
Int_t d_col_ij
Int_t d_row_ij
Int_t d_col_jk
Int_t d_row_jk
Int_t d2_colrow_jk
Int_t d2_colrow_ij
TArrayI iPadActive
public:
TArrayI iPadPlane
TArrayI iPadPlaneCopy
TArrayI iPadCol
TArrayI iPadRow
Int_t iRingNr
HRichHit* pRings
TList fHitList1
TList fHitList2
TList fHitCandidate
HRichRingFind
Ring recognition algorithms.
***************************************************************************
this Class isnt a task but it is called every event in the execute fn. of hrichanalysis
HRichRingFind()
Bool_t init(HRichAnalysis* showMe)
~HRichRingFind()
HRichRingFind(const HRichRingFind& source)
Float_t CalcDistance(Int_t x, Int_t y, const HRichHit& ring)
Float_t CalcDistance(Int_t x1, Int_t y1, Int_t x2, Int_t y2)
Float_t CalcDistance(const HRichHit& ring1, const HRichHit& ring2)
Double_t HomogenDistr(Double_t left, Double_t right)
Int_t GetAlgorithmNr(HRichAnalysis *showMe)
Int_t Execute(HRichAnalysis *giveMe)
void RingFindFitMatrix(HRichAnalysis *showMe,
Int_t minampl, Int_t distance, Int_t howmanyrings)
void RingFindHoughTransf(HRichAnalysis *showMe,
Int_t minampl, Int_t distance, Int_t howmanyrings)
void MaxFinding(HRichAnalysis *showYou, TList *hitList,
TArrayI *in, TArrayI *out, Int_t ringnr, Float_t distance)
This function looks for local maxima among 8 neighbouring pads in
the "in" array (iPadPlabe) "and fills the output "out" array.
The iPadPlane contains the pads that correpond to the ring center
each with its specific weight. Among them the Local Maxima is sought.
The "out" array is created here in such a way that the amplitude
of a local maximum is copied from input "in" array (iPdaPlane),
the pads that are not local maxima are marked with '-1'.
The pads that havent been fired are marked with '0'.
The parameters of local maxima are first put to the list fHitCandidate
of HRichHitCandidate objects. The list is sorted by descending
ring quality and only the rings that are at a minimal distance
of "distance" from each other are stored in a "hitList".
void MaxSelector(HRichAnalysis *showMe, TList *hitList,
TArrayI *in, TArrayI *out)
This function is used to label the clusters of the local maxima.
The pads corresponding to a L.M. were labeled in the MaxFinding
function and their values stored in "out" array.
A label is assigned to each L.M. (hit) belonging to the list "hitList"
(this list has been filled at the end of the member function
MaxFinding)
and this label must be now propagated to all pads belonging
to the L.M cluster. The condition to be fullfilled in order to belong
to a cluster is that the pads are reachable from the maximum (L.M.)
in a descending monotonous way. If a pad belongs to more than
one clusters it is marked with '-2'. At the end all the connected fired pads
of a local maximum are marked with the label of this maximum (even
if they are '-2'. In case of a conflict (possible only if two
maxima are separated by one pad) the label of maximum with
higher amplitude is assigned to the pads.
The propagation of a label is done in a similar way as in the case
of cleaning algorithm (high amplitude clusters).
void MaxMarker(HRichAnalysis *showYou,
TArrayI *in, TArrayI *out,
Int_t nowPad, Int_t maxCode)
This function is called by MaxSelector recursively to propagate
given label "maxCode" of a l.m. to all pads beloning to the l.m cluster.
All these pads are marked with '-1' in the "out" array.
If the pad marked earlier by a label from another maximum is reached
it is marked as a common pad with '-2'.
The label is propagated as long as the value of the weight of the
concatenated pads is monotonous.
Int_t MaxLabAmpl(TList *hitList, Int_t maxCode)
This is an auxiliary function called by MaxSelector only.
It returns the amplitude of a local maximum labeled with "maxCode".
void MaxAnalysis(HRichAnalysis *showMe, TList *hitList,
TArrayI *in, TArrayI *out, Int_t minAmpl)
The function analyses local maximum cluster, calculating the mean
position of a maximum, weighted by the amplitude of pads in cluster,
also cluster size and the amplitude sum of the pads belonging to a cluster.
The data are stored in HRichHit structure.
void MaxCluster(HRichAnalysis *showYou,
TArrayI *in, TArrayI *out,
Int_t nowPad, Int_t maxCode, Int_t minAmpl)
Function called recursively from MaxAnalysis to analyse features of local
maxima clusters; similar to MaxMarker.
Int_t TestRing(HRichAnalysis *showIt, HRichHit *hit, Int_t amplit)
Bool_t TestDensity(HRichAnalysis *showYou, HRichHit *pHit)
Bool_t TestBorder(HRichAnalysis *showYou, HRichHit *pHit, Int_t amplit)
Bool_t TestDynamic(HRichAnalysis *showYou, HRichHit *pHit, Int_t amplit)
Bool_t TestRatio(HRichAnalysis *showYou, HRichHit *pHit)
Bool_t TestAsymmetry(HRichAnalysis *showYou, HRichHit *pHit, Int_t amplit)
Bool_t TestRingCharge(HRichHit *hit)
Average charge of ring candidate is checked, minimum and maximum
value are set in the richanalysispar.txt.
cout<<" in test charge "<<endl;
void CalcRingParameters(HRichAnalysis *showMe,HRichHit *pHit)
This method calculates for each ring candidate:
1) the number of fired pads that belong to the ring (all fired
pads in the region 13X13 centered in the ring center)
2) the total charge of the ring obtained summing up all
the charges of the pads that belong to the ring.
3) the number of photon local maxima among 5 pads, that should correspond
to the number of photon in one ring
4) the number of photon local maxima among 9 pads.
It is called at the end of the RingFindHoughTransf and RingFindFitMatrix
function, after the lists of candidate have been filled and all properties
calculated
Int_t MatchRings(HRichAnalysis *showMe, TList *hitList1,
TList *hitList2)
If both algorithms are active and iSuperiorAlgorithmID = 3 then
hit with iRingAlgorithmIndex = 3 is Pattern Matrix information
hit with iRingAlgorithmIndex = 4 is Hough Transform information
iSuperiorAlgorithmID = 3 means all rings found independently by
two algorithms are stored.
If both algorithms are active and iSuperiorAlgorithmID = 1 or 2 then
only rings found by both algorithms are stored. If iSuperiorAlgorithmID = 1
information is taken from Pattern Matrix and iRingAlgorithmIndex = 5.
If iSuperiorAlgorithmID = 2 information is taken from Hough Transform
and iRingAlgorithmIndex = 6. This distinction is made because the
position of a ring found by both algorithms may slightly differ and
therefore also ring parameters may differ.
If only one algorithm is active then iSuperiorAlgorithmID flag is
ignored and rings found by the active algorithm are stored.
If it is Pattern Matrix iRingAlgorithmIndex = 1 and in the case
of Hough Transform iRingAlgorithmIndex = 2.
In general if iRingAlgorithmIndexis is odd (1,3,5) information on a ring
found by Pattern Matrix algorithm is stored and if iRingAlgorithmIndexis
is even (2,4,6) information on a ring found by Hough Transform algorithm
is stored.
cout<<" in match rings "<<endl;
cout<<" GetAlgorithmNr(showMe) "<< GetAlgorithmNr(showMe) <<endl;
cout<<" pAnalysisParams->iSuperiorAlgorithmID "<< pAnalysisParams->iSuperiorAlgorithmID <<endl;
void CalcFakeContribution(HRichAnalysis *showMe)
void CalcRingClusters(HRichAnalysis *showYou, Int_t *dumpArr,
Int_t ringNr, Int_t nowX, Int_t nowY)
void CloseMaxRejection(TList *hitList)
Inline Functions
HRichRingFind& operator=(const HRichRingFind& source)
TClass* Class()
TClass* IsA() const
void ShowMembers(TMemberInspector& insp, char* parent)
void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
Author: Witold Przygoda (przygoda@psja1.if.uj.edu.pl)
Last update: 2000/10/xx by Wolfgang Koenig
ROOT page - Class index - Class Hierarchy - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.