AliRoot Core  3abf5b4 (3abf5b4)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMUONClusterFinderMLEM Class Reference

Cluster finder in MUON arm of ALICE. More...

#include <AliMUONClusterFinderMLEM.h>

Inheritance diagram for AliMUONClusterFinderMLEM:

Public Member Functions

 AliMUONClusterFinderMLEM (Bool_t plot, AliMUONVClusterFinder *clusterFinder)
 
virtual ~AliMUONClusterFinderMLEM ()
 
virtual Bool_t NeedSegmentation () const
 
virtual Bool_t Prepare (Int_t detElemId, TObjArray *pads[2], const AliMpArea &area, const AliMpVSegmentation *segmentations[2])
 
virtual AliMUONClusterNextCluster ()
 
virtual void SetChargeHints (Double_t lowestPadCharge, Double_t lowestClusterCharge)
 
virtual void Print (Option_t *opt="") const
 
virtual void Paint (Option_t *opt="")
 
- Public Member Functions inherited from AliMUONVClusterFinder
 AliMUONVClusterFinder ()
 
virtual ~AliMUONVClusterFinder ()
 
virtual Bool_t Prepare (Int_t detElemId, TObjArray *pads[2], const AliMpArea &area)
 
virtual Bool_t UsePad (const AliMUONPad &pad)
 

Static Public Member Functions

static Int_t GetZeroFlag ()
 Return pad "basic" state flag. More...
 
static Int_t GetMustKeepFlag ()
 Return do not kill flag. More...
 
static Int_t GetUseForFitFlag ()
 Return should be used for fit flag. More...
 
static Int_t GetOverFlag ()
 Return processing is over flag. More...
 
static Int_t GetModifiedFlag ()
 Return modified pad charge flag. More...
 
static Int_t GetCoupledFlag ()
 Return coupled pad flag. More...
 

Private Member Functions

 AliMUONClusterFinderMLEM (const AliMUONClusterFinderMLEM &rhs)
 Not implemented. More...
 
AliMUONClusterFinderMLEMoperator= (const AliMUONClusterFinderMLEM &rhs)
 Not implemented. More...
 
Bool_t WorkOnPreCluster ()
 
AliMUONClusterCheckPrecluster (const AliMUONCluster &cluster)
 Check precluster to simplify it (if possible), and return the simplified cluster. More...
 
AliMUONClusterCheckPreclusterTwoCathodes (AliMUONCluster *cluster)
 
Bool_t Overlap (const AliMUONPad &pad, const AliMUONPad &pixel)
 Checks whether a pad and a pixel have an overlapping area. More...
 
void BuildPixArray (AliMUONCluster &cluster)
 build array of pixels More...
 
void BuildPixArrayOneCathode (AliMUONCluster &cluster)
 
void PadOverHist (Int_t idir, Int_t ix0, Int_t iy0, AliMUONPad *pad, TH2D *hist1, TH2D *hist2)
 
void RemovePixel (Int_t i)
 
AliMUONPadPixel (Int_t i) const
 
Bool_t MainLoop (AliMUONCluster &cluster, Int_t iSimple)
 
void Mlem (AliMUONCluster &cluster, const Double_t *coef, Double_t *probi, Int_t nIter)
 
void FindCOG (Double_t *xyc)
 
Int_t FindNearest (const AliMUONPad *pixPtr0)
 
Int_t FindLocalMaxima (TObjArray *pixArray, Int_t *localMax, Double_t *maxVal)
 
void FlagLocalMax (TH2D *hist, Int_t i, Int_t j, Int_t *isLocalMax)
 
void FindCluster (AliMUONCluster &cluster, const Int_t *localMax, Int_t iMax)
 
void AddVirtualPad (AliMUONCluster &cluster)
 
void PadsInXandY (AliMUONCluster &cluster, Int_t &nInX, Int_t &nInY) const
 
void Simple (AliMUONCluster &cluster)
 Process simple cluster. More...
 
void Plot (const char *outputfile)
 
void ComputeCoefficients (AliMUONCluster &cluster, Double_t *coef, Double_t *probi)
 
void CheckOverlaps ()
 
void AddBinSimple (TH2D *mlem, Int_t ic, Int_t jc)
 
void MaskPeaks (Int_t mask)
 

Private Attributes

AliMUONVClusterFinderfPreClusterFinder
 ! the pre-clustering worker More...
 
AliMUONClusterfPreCluster
 ! current pre-cluster More...
 
TObjArray fClusterList
 ! clusters corresponding to the current pre-cluster More...
 
Int_t fEventNumber
 ! current event being processed More...
 
Int_t fDetElemId
 ! current DE being processed More...
 
Int_t fClusterNumber
 ! current cluster number More...
 
const AliMpVSegmentationfkSegmentation [2]
 ! new segmentation More...
 
TH2D * fHistMlem
 ! histogram for MLEM procedure More...
 
TH2D * fHistAnode
 ! histogram for local maxima search More...
 
TObjArrayfPixArray
 ! collection of pixels More...
 
Int_t fDebug
 ! debug level More...
 
Bool_t fPlot
 ! whether we should plot thing (for debug only, quite slow!) More...
 
AliMUONClusterSplitterMLEMfSplitter
 ! helper class to go from pixel arrays to clusters More...
 
Int_t fNClusters
 ! total number of clusters More...
 
Int_t fNAddVirtualPads
 ! number of clusters for which we added virtual pads More...
 
Double_t fLowestPixelCharge
 ! see AliMUONRecoParam More...
 
Double_t fLowestPadCharge
 ! see AliMUONRecoParam More...
 
Double_t fLowestClusterCharge
 ! see AliMUONRecoParam More...
 

Static Private Attributes

static const Int_t fgkZero = 0x0
 pad "basic" state More...
 
static const Int_t fgkMustKeep = 0x1
 do not kill (for pixels) More...
 
static const Int_t fgkUseForFit = 0x10
 should be used for fit More...
 
static const Int_t fgkOver = 0x100
 processing is over More...
 
static const Int_t fgkModified = 0x1000
 modified pad charge More...
 
static const Int_t fgkCoupled = 0x10000
 coupled pad More...
 
static const Double_t fgkDistancePrecision = 1e-3
 used to check overlaps and so on More...
 
static const TVector2 fgkIncreaseSize
 idem More...
 
static const TVector2 fgkDecreaseSize
 idem More...
 

Detailed Description

Cluster finder in MUON arm of ALICE.

Clusterizer class based on the Expectation-Maximization algorithm

Pre-clustering is handled by AliMUONPreClusterFinder From a precluster a pixel array is built, and from this pixel array a list of clusters is output (using AliMUONClusterSplitterMLEM).

Author
Laurent Aphecetche (for the "new" C++ structure) and Alexander Zinchenko, JINR Dubna, for the hardcore of it ;-)

Definition at line 31 of file AliMUONClusterFinderMLEM.h.

Constructor & Destructor Documentation

AliMUONClusterFinderMLEM::AliMUONClusterFinderMLEM ( Bool_t  plot,
AliMUONVClusterFinder clusterFinder 
)

Constructor

Definition at line 69 of file AliMUONClusterFinderMLEM.cxx.

AliMUONClusterFinderMLEM::~AliMUONClusterFinderMLEM ( )
virtual

Destructor

Definition at line 97 of file AliMUONClusterFinderMLEM.cxx.

AliMUONClusterFinderMLEM::AliMUONClusterFinderMLEM ( const AliMUONClusterFinderMLEM rhs)
private

Not implemented.

Member Function Documentation

void AliMUONClusterFinderMLEM::AddBinSimple ( TH2D *  mlem,
Int_t  ic,
Int_t  jc 
)
private

Add adjacent bins (+-1 in X and Y) to the cluster

Definition at line 1563 of file AliMUONClusterFinderMLEM.cxx.

Referenced by FindCluster().

void AliMUONClusterFinderMLEM::AddVirtualPad ( AliMUONCluster cluster)
private

Add virtual pad (with small charge) to improve fit for clusters with number of pads == 2 per direction

Definition at line 1599 of file AliMUONClusterFinderMLEM.cxx.

Referenced by MainLoop().

void AliMUONClusterFinderMLEM::BuildPixArray ( AliMUONCluster cluster)
private

build array of pixels

Build pixel array for MLEM method

Definition at line 566 of file AliMUONClusterFinderMLEM.cxx.

Referenced by WorkOnPreCluster().

void AliMUONClusterFinderMLEM::BuildPixArrayOneCathode ( AliMUONCluster cluster)
private

Build the pixel array

Definition at line 602 of file AliMUONClusterFinderMLEM.cxx.

Referenced by BuildPixArray().

void AliMUONClusterFinderMLEM::CheckOverlaps ( )
private

For debug only : check if some pixels overlap...

Definition at line 526 of file AliMUONClusterFinderMLEM.cxx.

AliMUONCluster * AliMUONClusterFinderMLEM::CheckPrecluster ( const AliMUONCluster cluster)
private

Check precluster to simplify it (if possible), and return the simplified cluster.

Check precluster in order to attempt to simplify it (mostly for two-cathode preclusters)

Definition at line 307 of file AliMUONClusterFinderMLEM.cxx.

Referenced by WorkOnPreCluster().

AliMUONCluster * AliMUONClusterFinderMLEM::CheckPreclusterTwoCathodes ( AliMUONCluster cluster)
private

Check two-cathode cluster

Definition at line 341 of file AliMUONClusterFinderMLEM.cxx.

Referenced by CheckPrecluster().

void AliMUONClusterFinderMLEM::ComputeCoefficients ( AliMUONCluster cluster,
Double_t *  coef,
Double_t *  probi 
)
private

Compute coefficients needed for MLEM algorithm

Definition at line 775 of file AliMUONClusterFinderMLEM.cxx.

Referenced by MainLoop().

void AliMUONClusterFinderMLEM::FindCluster ( AliMUONCluster cluster,
const Int_t *  localMax,
Int_t  iMax 
)
private

Find pixel cluster around local maximum iMax and pick up pads overlapping with it

Definition at line 1489 of file AliMUONClusterFinderMLEM.cxx.

Referenced by WorkOnPreCluster().

void AliMUONClusterFinderMLEM::FindCOG ( Double_t *  xyc)
private

Calculate position of the center-of-gravity around the maximum pixel

Definition at line 1224 of file AliMUONClusterFinderMLEM.cxx.

Referenced by MainLoop().

Int_t AliMUONClusterFinderMLEM::FindLocalMaxima ( TObjArray pixArray,
Int_t *  localMax,
Double_t *  maxVal 
)
private

Find local maxima in pixel space for large preclusters in order to try to split them into smaller pieces (to speed up the MLEM procedure) or to find additional fitting seeds if clusters were not completely resolved

Definition at line 1388 of file AliMUONClusterFinderMLEM.cxx.

Referenced by WorkOnPreCluster().

Int_t AliMUONClusterFinderMLEM::FindNearest ( const AliMUONPad pixPtr0)
private

Find the pixel nearest to the given one (algorithm may be not very efficient)

Definition at line 1307 of file AliMUONClusterFinderMLEM.cxx.

Referenced by MainLoop().

void AliMUONClusterFinderMLEM::FlagLocalMax ( TH2D *  hist,
Int_t  i,
Int_t  j,
Int_t *  isLocalMax 
)
private

Flag pixels (whether or not local maxima)

Definition at line 1455 of file AliMUONClusterFinderMLEM.cxx.

Referenced by FindLocalMaxima().

static Int_t AliMUONClusterFinderMLEM::GetCoupledFlag ( )
inlinestatic
static Int_t AliMUONClusterFinderMLEM::GetModifiedFlag ( )
inlinestatic

Return modified pad charge flag.

Definition at line 65 of file AliMUONClusterFinderMLEM.h.

Referenced by AliMUONClusterSplitterMLEM::Split().

static Int_t AliMUONClusterFinderMLEM::GetMustKeepFlag ( )
inlinestatic

Return do not kill flag.

Definition at line 59 of file AliMUONClusterFinderMLEM.h.

static Int_t AliMUONClusterFinderMLEM::GetOverFlag ( )
inlinestatic

Return processing is over flag.

Definition at line 63 of file AliMUONClusterFinderMLEM.h.

Referenced by AliMUONClusterSplitterMLEM::Split(), and AliMUONClusterSplitterMLEM::UpdatePads().

static Int_t AliMUONClusterFinderMLEM::GetUseForFitFlag ( )
inlinestatic
static Int_t AliMUONClusterFinderMLEM::GetZeroFlag ( )
inlinestatic
Bool_t AliMUONClusterFinderMLEM::MainLoop ( AliMUONCluster cluster,
Int_t  iSimple 
)
private

Repeat MLEM algorithm until pixel size becomes sufficiently small

Definition at line 821 of file AliMUONClusterFinderMLEM.cxx.

Referenced by WorkOnPreCluster().

void AliMUONClusterFinderMLEM::MaskPeaks ( Int_t  mask)
private

Mask/unmask pixels corresponding to local maxima (add/subtract 10000 to their charge

  • to avoid loosing low charge pixels after sorting)

Definition at line 1137 of file AliMUONClusterFinderMLEM.cxx.

Referenced by MainLoop().

void AliMUONClusterFinderMLEM::Mlem ( AliMUONCluster cluster,
const Double_t *  coef,
Double_t *  probi,
Int_t  nIter 
)
private

Use MLEM to find pixel charges

Definition at line 1152 of file AliMUONClusterFinderMLEM.cxx.

Referenced by MainLoop().

virtual Bool_t AliMUONClusterFinderMLEM::NeedSegmentation ( ) const
inlinevirtual
Todo:
add comment

Reimplemented from AliMUONVClusterFinder.

Definition at line 37 of file AliMUONClusterFinderMLEM.h.

AliMUONCluster * AliMUONClusterFinderMLEM::NextCluster ( )
virtual
Todo:
add comment

Return next cluster

Implements AliMUONVClusterFinder.

Definition at line 155 of file AliMUONClusterFinderMLEM.cxx.

AliMUONClusterFinderMLEM & AliMUONClusterFinderMLEM::operator= ( const AliMUONClusterFinderMLEM rhs)
private

Not implemented.

Protected assignement operator

Definition at line 1587 of file AliMUONClusterFinderMLEM.cxx.

Bool_t AliMUONClusterFinderMLEM::Overlap ( const AliMUONPad pad,
const AliMUONPad pixel 
)
private

Checks whether a pad and a pixel have an overlapping area.

Check if the pad and the pixel overlaps

Definition at line 293 of file AliMUONClusterFinderMLEM.cxx.

Referenced by FindCluster().

void AliMUONClusterFinderMLEM::PadOverHist ( Int_t  idir,
Int_t  ix0,
Int_t  iy0,
AliMUONPad pad,
TH2D *  hist1,
TH2D *  hist2 
)
private

"Span" pad over histogram in the direction idir

Definition at line 709 of file AliMUONClusterFinderMLEM.cxx.

Referenced by BuildPixArrayOneCathode().

void AliMUONClusterFinderMLEM::PadsInXandY ( AliMUONCluster cluster,
Int_t &  nInX,
Int_t &  nInY 
) const
private

Find number of pads in X and Y-directions (excluding virtual ones and overflows)

Definition at line 1713 of file AliMUONClusterFinderMLEM.cxx.

Referenced by WorkOnPreCluster().

void AliMUONClusterFinderMLEM::Paint ( Option_t *  opt = "")
virtual

Paint cluster and pixels

Definition at line 1330 of file AliMUONClusterFinderMLEM.cxx.

AliMUONPad * AliMUONClusterFinderMLEM::Pixel ( Int_t  i) const
private

Returns pixel at index i

Definition at line 1775 of file AliMUONClusterFinderMLEM.cxx.

Referenced by CheckOverlaps(), ComputeCoefficients(), FindCluster(), MainLoop(), MaskPeaks(), Mlem(), Paint(), and RemovePixel().

void AliMUONClusterFinderMLEM::Plot ( const char *  outputfile)
private

Make a plot and save it as png

Definition at line 757 of file AliMUONClusterFinderMLEM.cxx.

Bool_t AliMUONClusterFinderMLEM::Prepare ( Int_t  detElemId,
TObjArray pads[2],
const AliMpArea area,
const AliMpVSegmentation segmentations[2] 
)
virtual

Prepare for clustering

Reimplemented from AliMUONVClusterFinder.

Definition at line 110 of file AliMUONClusterFinderMLEM.cxx.

void AliMUONClusterFinderMLEM::Print ( Option_t *  opt = "") const
virtual

printout

Definition at line 1783 of file AliMUONClusterFinderMLEM.cxx.

void AliMUONClusterFinderMLEM::RemovePixel ( Int_t  i)
private

Remove pixel at index i

Definition at line 1734 of file AliMUONClusterFinderMLEM.cxx.

Referenced by BuildPixArray(), and MainLoop().

void AliMUONClusterFinderMLEM::SetChargeHints ( Double_t  ,
Double_t   
)
virtual

Specify a couple of charge hints. We call them hints because some clustering need them and use them directly, other cook them before using them, and some others yet simply don't care about them.

Set some thresholds we use later on in the algorithm

Reimplemented from AliMUONVClusterFinder.

Definition at line 1796 of file AliMUONClusterFinderMLEM.cxx.

void AliMUONClusterFinderMLEM::Simple ( AliMUONCluster cluster)
private

Process simple cluster.

Process simple cluster (small number of pads) without EM-procedure

Definition at line 1743 of file AliMUONClusterFinderMLEM.cxx.

Referenced by MainLoop().

Bool_t AliMUONClusterFinderMLEM::WorkOnPreCluster ( )
private

Starting from a precluster, builds a pixel array, and then extract clusters from this array

Definition at line 210 of file AliMUONClusterFinderMLEM.cxx.

Referenced by NextCluster().

Member Data Documentation

TObjArray AliMUONClusterFinderMLEM::fClusterList
private

! clusters corresponding to the current pre-cluster

Definition at line 136 of file AliMUONClusterFinderMLEM.h.

Referenced by MainLoop(), NextCluster(), Prepare(), and Simple().

Int_t AliMUONClusterFinderMLEM::fClusterNumber
private

! current cluster number

Definition at line 140 of file AliMUONClusterFinderMLEM.h.

Referenced by NextCluster(), and Prepare().

Int_t AliMUONClusterFinderMLEM::fDebug
private
Int_t AliMUONClusterFinderMLEM::fDetElemId
private

! current DE being processed

Definition at line 139 of file AliMUONClusterFinderMLEM.h.

Referenced by AddVirtualPad(), CheckPreclusterTwoCathodes(), MainLoop(), Prepare(), and WorkOnPreCluster().

Int_t AliMUONClusterFinderMLEM::fEventNumber
private

! current event being processed

Definition at line 138 of file AliMUONClusterFinderMLEM.h.

Referenced by MainLoop(), Prepare(), and WorkOnPreCluster().

const Int_t AliMUONClusterFinderMLEM::fgkCoupled = 0x10000
staticprivate

coupled pad

Definition at line 127 of file AliMUONClusterFinderMLEM.h.

Referenced by GetCoupledFlag().

const TVector2 AliMUONClusterFinderMLEM::fgkDecreaseSize
staticprivate

idem

Definition at line 132 of file AliMUONClusterFinderMLEM.h.

Referenced by CheckOverlaps(), CheckPreclusterTwoCathodes(), and Overlap().

const Double_t AliMUONClusterFinderMLEM::fgkDistancePrecision = 1e-3
staticprivate

used to check overlaps and so on

Definition at line 130 of file AliMUONClusterFinderMLEM.h.

Referenced by AddVirtualPad(), BuildPixArrayOneCathode(), and PadOverHist().

const TVector2 AliMUONClusterFinderMLEM::fgkIncreaseSize
staticprivate

idem

Definition at line 131 of file AliMUONClusterFinderMLEM.h.

const Int_t AliMUONClusterFinderMLEM::fgkModified = 0x1000
staticprivate

modified pad charge

Definition at line 126 of file AliMUONClusterFinderMLEM.h.

Referenced by GetModifiedFlag().

const Int_t AliMUONClusterFinderMLEM::fgkMustKeep = 0x1
staticprivate

do not kill (for pixels)

Definition at line 123 of file AliMUONClusterFinderMLEM.h.

Referenced by FindLocalMaxima(), GetMustKeepFlag(), MainLoop(), and MaskPeaks().

const Int_t AliMUONClusterFinderMLEM::fgkOver = 0x100
staticprivate

processing is over

Definition at line 125 of file AliMUONClusterFinderMLEM.h.

Referenced by FindCluster(), GetOverFlag(), MainLoop(), and WorkOnPreCluster().

const Int_t AliMUONClusterFinderMLEM::fgkUseForFit = 0x10
staticprivate

should be used for fit

Definition at line 124 of file AliMUONClusterFinderMLEM.h.

Referenced by GetUseForFitFlag(), PadsInXandY(), and Simple().

const Int_t AliMUONClusterFinderMLEM::fgkZero = 0x0
staticprivate
TH2D* AliMUONClusterFinderMLEM::fHistAnode
private

! histogram for local maxima search

Definition at line 149 of file AliMUONClusterFinderMLEM.h.

Referenced by FindCluster(), FindLocalMaxima(), and WorkOnPreCluster().

TH2D* AliMUONClusterFinderMLEM::fHistMlem
private

! histogram for MLEM procedure

Definition at line 148 of file AliMUONClusterFinderMLEM.h.

Referenced by FindCOG(), MainLoop(), Simple(), and WorkOnPreCluster().

const AliMpVSegmentation* AliMUONClusterFinderMLEM::fkSegmentation[2]
private

! new segmentation

Definition at line 142 of file AliMUONClusterFinderMLEM.h.

Referenced by AddVirtualPad(), CheckPreclusterTwoCathodes(), and Prepare().

Double_t AliMUONClusterFinderMLEM::fLowestClusterCharge
private
Double_t AliMUONClusterFinderMLEM::fLowestPadCharge
private
Double_t AliMUONClusterFinderMLEM::fLowestPixelCharge
private
Int_t AliMUONClusterFinderMLEM::fNAddVirtualPads
private

! number of clusters for which we added virtual pads

Definition at line 157 of file AliMUONClusterFinderMLEM.h.

Referenced by ~AliMUONClusterFinderMLEM().

Int_t AliMUONClusterFinderMLEM::fNClusters
private

! total number of clusters

Definition at line 156 of file AliMUONClusterFinderMLEM.h.

Referenced by ~AliMUONClusterFinderMLEM().

Bool_t AliMUONClusterFinderMLEM::fPlot
private

! whether we should plot thing (for debug only, quite slow!)

Definition at line 153 of file AliMUONClusterFinderMLEM.h.

AliMUONCluster* AliMUONClusterFinderMLEM::fPreCluster
private

! current pre-cluster

Definition at line 135 of file AliMUONClusterFinderMLEM.h.

Referenced by CheckPreclusterTwoCathodes(), NextCluster(), Paint(), Print(), and WorkOnPreCluster().

AliMUONVClusterFinder* AliMUONClusterFinderMLEM::fPreClusterFinder
private

! the pre-clustering worker

Definition at line 134 of file AliMUONClusterFinderMLEM.h.

Referenced by NextCluster(), Prepare(), and ~AliMUONClusterFinderMLEM().

AliMUONClusterSplitterMLEM* AliMUONClusterFinderMLEM::fSplitter
private

! helper class to go from pixel arrays to clusters

Definition at line 155 of file AliMUONClusterFinderMLEM.h.

Referenced by ComputeCoefficients(), FindLocalMaxima(), MainLoop(), Prepare(), Simple(), and ~AliMUONClusterFinderMLEM().


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