class HRichRingFind: public TObject


 File: hrichringfind.cc

 $Id: hrichringfind.cc,v 1.27 2009-07-16 13:42:57 jurkovic Exp $

*-- Author : Witold Przygoda (przygoda@psja1.if.uj.edu.pl)
*-- Modified : 2000/10/xx by Wolfgang Koenig
*-- Modified : 2001/01/xx by Laura Fabbietti
*-- Modified : 2001/09/06 by Witold Przygoda

_HADES_CLASS_DESCRIPTION


  HRichRingFind

  Ring recognition algorithms. This class isn't any task but it is called
  for each event from the HRichAnalysis::execute() function.


Function Members (Methods)

public:
HRichRingFind()
HRichRingFind(const HRichRingFind& source)
virtual~HRichRingFind()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
Float_tCalcDistance(const HRichHit& ring1, const HRichHit& ring2)
Float_tCalcDistance(Int_t x, Int_t y, const HRichHit& ring)
Float_tCalcDistance(Int_t x1, Int_t y1, Int_t x2, Int_t y2)
virtual voidCalcFakeContribution(HRichAnalysis* showMe)
voidCalcRingClusters(HRichAnalysis* showYou, Int_t* dumpArr, Int_t ringNr, Int_t nowX, Int_t nowY)
virtual voidCalcRingParameters(HRichAnalysis* showMe, HRichHit* pHit)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
voidCloseMaxRejection(TList* hitList)
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTObject::Copy(TObject& object) const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
Int_tExecute(HRichAnalysis* giveMe)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
Int_tGetAlgorithmNr(HRichAnalysis* showMe)
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
virtual const char*TObject::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
Bool_tinit(HRichAnalysis*)
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTObject::ls(Option_t* option = "") const
Int_tMatchRings(HRichAnalysis* showMe, TList* hitList1, TList* hitList2)
voidMaxAnalysis(HRichAnalysis* showMe, TList* hitList, TArrayI* in, TArrayI* out, Int_t minAmpl)
voidMaxCluster(HRichAnalysis* showYou, TArrayI* in, TArrayI* out, Int_t nowPad, Int_t maxCode, Int_t minAmpl)
voidMaxFinding(HRichAnalysis* showYou, TList* hitList, TArrayI* in, TArrayI* out, Int_t ringnr, Float_t distance)
Int_tMaxLabAmpl(TList* hitList, Int_t maxCode)
voidMaxMarker(HRichAnalysis* showYou, TArrayI* in, TArrayI* out, Int_t nowPad, Int_t maxCode)
voidMaxSelector(HRichAnalysis* showMe, TList* hitList, TArrayI* in, TArrayI* out)
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
HRichRingFind&operator=(const HRichRingFind& source)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTObject::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
voidRingFindFitMatrix(HRichAnalysis* showMe, Int_t minampl, Int_t distance, Int_t howmanyrings = 5)
voidRingFindHoughTransf(HRichAnalysis* showMe, Int_t minampl, Int_t distance, Int_t howmanyrings = 5)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTestAsymmetry(HRichAnalysis* showYou, HRichHit* pHit, Int_t amplit)
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
Bool_tTestBorder(HRichAnalysis* showYou, HRichHit* pHit, Int_t amplit)
Bool_tTestDensity(HRichAnalysis* showYou, HRichHit* pHit)
Bool_tTestDynamic(HRichAnalysis* showYou, HRichHit* pHit, Int_t amplit)
Bool_tTestRatio(HRichAnalysis* showYou, HRichHit* pHit)
Int_tTestRing(HRichAnalysis* showYou, HRichHit* hit, Int_t amplit)
Bool_tTestRingCharge(HRichHit* hit)
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
Double_tHomogenDistr(Double_t left, Double_t right)
voidTObject::MakeZombie()

Data Members

public:
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
public:
TListfHitCandidate
TListfHitList1
TListfHitList2
TArrayIiPadCol
TArrayIiPadPlane
TArrayIiPadPlaneCopy
TArrayIiPadRow
Int_tiRingNr
HRichHit*pRings
protected:
Int_td2_colrow_ij
Int_td2_colrow_jk
Int_td_col_ij
Int_td_col_jk
Int_td_row_ij
Int_td_row_jk
Float_tfClusterLMax4
Float_tfClusterLMax8
Float_tfClusterSize
Int_tfMaxClusterSize
Int_tfMaxClusterSum
Int_tfMaxThrClusterSize
Int_tiCount
Int_tiHitCount
Int_tiInnerCount
Int_tiInnerPhot4
Int_tiInnerPhot8
Int_tiMatrixHalfSize
Int_tiMatrixSize
TArrayIiPadActive
Int_tiRingImageSize
TArrayIiRingTempImage
Int_tlx_from
Int_tlx_to
Int_tly_from
Int_tly_to
Int_tmaxCols
Int_tmaxRingsmax number of rich hits in pRings array
Int_tmaxRows
HRichAnalysisPar*pAnalysisParams
HRichGeometryPar*pGeometryParams
Float_tphiMeanMax
Float_tthetaMeanMax
Float_txMeanMax
Float_txPadMeanMax
Float_tyMeanMax
Float_tyPadMeanMax

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

HRichRingFind()
init(HRichAnalysis* )
~HRichRingFind()
HRichRingFind(const HRichRingFind& source)
operator=(const HRichRingFind& source)
CalcDistance(Int_t x, Int_t y, const HRichHit& ring)
CalcDistance(Int_t x1, Int_t y1, Int_t x2, Int_t y2)
CalcDistance(const HRichHit& ring1, const HRichHit& ring2)
HomogenDistr(Double_t left, Double_t right)
GetAlgorithmNr(HRichAnalysis* showMe)
Execute(HRichAnalysis* giveMe)
 According to the settings in the HRichAnalysisPar parameter
 container, ring finding algorithms are executed.
 - Ring candidates found by the pattern matrix
   are stored in the list fHitList1
 - Ring candidates found by the hough trasfomation
   are stored in the list fHitList2
 At the end the two list of candidates are merged according
 to the analysis parameter (see comment in MatchRings)
RingFindFitMatrix(HRichAnalysis* showMe, Int_t minampl, Int_t distance, Int_t howmanyrings = 5)
 Ring recognition algorithm: Pattern Matrix
RingFindHoughTransf(HRichAnalysis* showMe, Int_t minampl, Int_t distance, Int_t howmanyrings = 5)
 Ring recognition algorithm: Hough Transform
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".
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).
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.
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".

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.

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.

TestRing(HRichAnalysis* showYou, HRichHit* hit, Int_t amplit)
 All the rings that have been found by the 2 algorhtms and then
 further analyzed, are tested.
 There are five tests at the moment and they are active if their
 Status is set to 1 or 2. If Status == 1 a given test is
 performed and the result is stored in the HRichHit structure.
 If Status == 2, the test result must be positive to store
 the hit candidate in the output file. If Status == 0 the test
 is not performed and the information stored in HRichHit can
 be false or true, depending on the test (see tests for details).

TestDensity(HRichAnalysis* showYou, HRichHit* pHit)
 If density (ratio: fired pads / all active pads) in label larger
 than 2*Sm - see below - exceeds 40%, ring recognition is not performed.
 For small labels like < 2*(pattern matrix surface) this test is not performed.

TestBorder(HRichAnalysis* showYou, HRichHit* pHit, Int_t amplit)
 Basic check for the ring amplitude.
 Reduction of the threshold amplitude at the borders of the detector
 is applied, proportionally to the part of a ring which is cut (outside).
 Maximum reduction is by 50% (it means half or more of a ring can be still
 recognised. If there is more than a half of a ring outside it must have
 iRingQuality >= amplit (without any threshold reduction) to be accepted.
 Additionally in this test fBorderFactor is written to a hit !

TestDynamic(HRichAnalysis* showYou, HRichHit* pHit, Int_t amplit)
 The dynamic minimal (threshold) amplitude (quality) is estimated here
 if called with amplit > 0 and for rings that are mainly not outside.
 It is calculated due to highly fenomenological formula:

      threshold Amplitude = amplit * e^( P1*(S/Sm - 1) + P2*(D/P3 - 1) )
  where
      P1 - parameter (0.055)
      P2 - parameter (0.5)
      Sm = ring pattern matrix surface (in number of pads units)
      S  = number of pads in given labeled area
      P3 = mean density (ratio: pads fired / all pads) for ring matrix area ~0.15
      D  = density of fired pads for given labeled area

TestRatio(HRichAnalysis* showYou, HRichHit* pHit)
 This part calculates how many fired pads belong to ring in comparison
 with the number of fired pads outside and inside. The area of ringMask
 is scanned. In it the fired pads outside/inside of ring must
 not to exceed i.e.  33% of total number of fired pads in this area -
 at least 67% has to be inside of ring border.
 If ring is outside the test is not done (always positive).

TestAsymmetry(HRichAnalysis* showYou, HRichHit* pHit, Int_t amplit)
 The asymmetry of ring is investigated. The centroid of the ring is
 defined by the difference in X and Y coordinates between the ring center
 and the center of gravity of the ring. In order to get a positive
 decision from the test  the distance must be lower than iRingRadiusError given in input data.
 Then a ring radius is calculated and it also has to fit
 in the value iRingRadius +/- iRingRadiusError.
 If a ring is clearly outside the border the test is not done (always positive).
 REMARK: ring radius and ring centroid are calculated ONLY for rings
 inside the frame! If the ring candidate is placed partially outside
 zero values for its radius and centroid are stored in HRichHit.

TestRingCharge(HRichHit* hit)
 Average charge of ring candidate is checked, minimum and maximum
 value are set in the richanalysispar.txt.

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

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.

CalcFakeContribution(HRichAnalysis* showMe)
CalcRingClusters(HRichAnalysis* showYou, Int_t* dumpArr, Int_t ringNr, Int_t nowX, Int_t nowY)
 the function calculates the total number of pads and photon
 local maxima (4 and 8-connected pads), for all the clusters
 that belong to a ring.

CloseMaxRejection(TList* hitList)
 this method tests the quality of candidates close
 to bright rings. Picking up some intensity of the
 bright ring fakes could be identified.
 If the quality of these "fakes" candidates is too
 low compared with the quality of the bright ring
 the candidates are rejected ( if the isActiveFakesRejection
 is equal 2) or stored and labeled with a flag.
 If the quality of the 2 compared rings is similar
 the centroid of both is checked, if one of the two is
 very assymmetric is rejected.

Last change: Sat May 22 13:09:57 2010
Last generated: 2010-05-22 13:09

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.