![]() |
AliRoot Core
3abf5b4 (3abf5b4)
|
Cluster finder in MUON arm of ALICE. More...
#include <AliMUONClusterFinderMLEM.h>
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 AliMUONCluster * | NextCluster () |
virtual void | SetChargeHints (Double_t lowestPadCharge, Double_t lowestClusterCharge) |
virtual void | Print (Option_t *opt="") const |
virtual void | Paint (Option_t *opt="") |
![]() | |
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... | |
AliMUONClusterFinderMLEM & | operator= (const AliMUONClusterFinderMLEM &rhs) |
Not implemented. More... | |
Bool_t | WorkOnPreCluster () |
AliMUONCluster * | CheckPrecluster (const AliMUONCluster &cluster) |
Check precluster to simplify it (if possible), and return the simplified cluster. More... | |
AliMUONCluster * | CheckPreclusterTwoCathodes (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) |
AliMUONPad * | Pixel (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 | |
AliMUONVClusterFinder * | fPreClusterFinder |
! the pre-clustering worker More... | |
AliMUONCluster * | fPreCluster |
! 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 AliMpVSegmentation * | fkSegmentation [2] |
! new segmentation More... | |
TH2D * | fHistMlem |
! histogram for MLEM procedure More... | |
TH2D * | fHistAnode |
! histogram for local maxima search More... | |
TObjArray * | fPixArray |
! collection of pixels More... | |
Int_t | fDebug |
! debug level More... | |
Bool_t | fPlot |
! whether we should plot thing (for debug only, quite slow!) More... | |
AliMUONClusterSplitterMLEM * | fSplitter |
! 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... | |
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).
Definition at line 31 of file AliMUONClusterFinderMLEM.h.
AliMUONClusterFinderMLEM::AliMUONClusterFinderMLEM | ( | Bool_t | plot, |
AliMUONVClusterFinder * | clusterFinder | ||
) |
Constructor
Definition at line 69 of file AliMUONClusterFinderMLEM.cxx.
|
virtual |
Destructor
Definition at line 97 of file AliMUONClusterFinderMLEM.cxx.
|
private |
Not implemented.
|
private |
Add adjacent bins (+-1 in X and Y) to the cluster
Definition at line 1563 of file AliMUONClusterFinderMLEM.cxx.
Referenced by FindCluster().
|
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().
|
private |
build array of pixels
Build pixel array for MLEM method
Definition at line 566 of file AliMUONClusterFinderMLEM.cxx.
Referenced by WorkOnPreCluster().
|
private |
Build the pixel array
Definition at line 602 of file AliMUONClusterFinderMLEM.cxx.
Referenced by BuildPixArray().
|
private |
For debug only : check if some pixels overlap...
Definition at line 526 of file AliMUONClusterFinderMLEM.cxx.
|
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().
|
private |
Check two-cathode cluster
Definition at line 341 of file AliMUONClusterFinderMLEM.cxx.
Referenced by CheckPrecluster().
|
private |
Compute coefficients needed for MLEM algorithm
Definition at line 775 of file AliMUONClusterFinderMLEM.cxx.
Referenced by MainLoop().
|
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().
|
private |
Calculate position of the center-of-gravity around the maximum pixel
Definition at line 1224 of file AliMUONClusterFinderMLEM.cxx.
Referenced by MainLoop().
|
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().
|
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().
|
private |
Flag pixels (whether or not local maxima)
Definition at line 1455 of file AliMUONClusterFinderMLEM.cxx.
Referenced by FindLocalMaxima().
|
inlinestatic |
Return coupled pad flag.
Definition at line 67 of file AliMUONClusterFinderMLEM.h.
Referenced by AliMUONClusterSplitterMLEM::SelectPad(), AliMUONClusterSplitterMLEM::Split(), and AliMUONClusterSplitterMLEM::UpdatePads().
|
inlinestatic |
Return modified pad charge flag.
Definition at line 65 of file AliMUONClusterFinderMLEM.h.
Referenced by AliMUONClusterSplitterMLEM::Split().
|
inlinestatic |
Return do not kill flag.
Definition at line 59 of file AliMUONClusterFinderMLEM.h.
|
inlinestatic |
Return processing is over flag.
Definition at line 63 of file AliMUONClusterFinderMLEM.h.
Referenced by AliMUONClusterSplitterMLEM::Split(), and AliMUONClusterSplitterMLEM::UpdatePads().
|
inlinestatic |
Return should be used for fit flag.
Definition at line 61 of file AliMUONClusterFinderMLEM.h.
Referenced by AliMUONClusterSplitterMLEM::Fcn1(), AliMUONClusterSplitterMLEM::Fit(), AliMUONClusterSplitterMLEM::SelectPad(), and AliMUONClusterSplitterMLEM::Split().
|
inlinestatic |
Return pad "basic" state flag.
Definition at line 57 of file AliMUONClusterFinderMLEM.h.
Referenced by AliMUONClusterSplitterMLEM::Merge(), AliMUONClusterSplitterMLEM::SelectPad(), AliMUONClusterSplitterMLEM::Split(), and AliMUONClusterSplitterMLEM::UpdatePads().
|
private |
Repeat MLEM algorithm until pixel size becomes sufficiently small
Definition at line 821 of file AliMUONClusterFinderMLEM.cxx.
Referenced by WorkOnPreCluster().
|
private |
Mask/unmask pixels corresponding to local maxima (add/subtract 10000 to their charge
Definition at line 1137 of file AliMUONClusterFinderMLEM.cxx.
Referenced by MainLoop().
|
private |
Use MLEM to find pixel charges
Definition at line 1152 of file AliMUONClusterFinderMLEM.cxx.
Referenced by MainLoop().
|
inlinevirtual |
Reimplemented from AliMUONVClusterFinder.
Definition at line 37 of file AliMUONClusterFinderMLEM.h.
|
virtual |
Return next cluster
Implements AliMUONVClusterFinder.
Definition at line 155 of file AliMUONClusterFinderMLEM.cxx.
|
private |
Not implemented.
Protected assignement operator
Definition at line 1587 of file AliMUONClusterFinderMLEM.cxx.
|
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().
|
private |
"Span" pad over histogram in the direction idir
Definition at line 709 of file AliMUONClusterFinderMLEM.cxx.
Referenced by BuildPixArrayOneCathode().
|
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().
|
virtual |
Paint cluster and pixels
Definition at line 1330 of file AliMUONClusterFinderMLEM.cxx.
|
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().
|
private |
Make a plot and save it as png
Definition at line 757 of file AliMUONClusterFinderMLEM.cxx.
|
virtual |
Prepare for clustering
Reimplemented from AliMUONVClusterFinder.
Definition at line 110 of file AliMUONClusterFinderMLEM.cxx.
|
virtual |
printout
Definition at line 1783 of file AliMUONClusterFinderMLEM.cxx.
|
private |
Remove pixel at index i
Definition at line 1734 of file AliMUONClusterFinderMLEM.cxx.
Referenced by BuildPixArray(), and MainLoop().
|
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.
|
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().
|
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().
|
private |
! clusters corresponding to the current pre-cluster
Definition at line 136 of file AliMUONClusterFinderMLEM.h.
Referenced by MainLoop(), NextCluster(), Prepare(), and Simple().
|
private |
! current cluster number
Definition at line 140 of file AliMUONClusterFinderMLEM.h.
Referenced by NextCluster(), and Prepare().
|
private |
! debug level
Definition at line 152 of file AliMUONClusterFinderMLEM.h.
Referenced by AddVirtualPad(), CheckPreclusterTwoCathodes(), FindCluster(), FindLocalMaxima(), Prepare(), and WorkOnPreCluster().
|
private |
! current DE being processed
Definition at line 139 of file AliMUONClusterFinderMLEM.h.
Referenced by AddVirtualPad(), CheckPreclusterTwoCathodes(), MainLoop(), Prepare(), and WorkOnPreCluster().
|
private |
! current event being processed
Definition at line 138 of file AliMUONClusterFinderMLEM.h.
Referenced by MainLoop(), Prepare(), and WorkOnPreCluster().
|
staticprivate |
coupled pad
Definition at line 127 of file AliMUONClusterFinderMLEM.h.
Referenced by GetCoupledFlag().
|
staticprivate |
idem
Definition at line 132 of file AliMUONClusterFinderMLEM.h.
Referenced by CheckOverlaps(), CheckPreclusterTwoCathodes(), and Overlap().
|
staticprivate |
used to check overlaps and so on
Definition at line 130 of file AliMUONClusterFinderMLEM.h.
Referenced by AddVirtualPad(), BuildPixArrayOneCathode(), and PadOverHist().
|
staticprivate |
idem
Definition at line 131 of file AliMUONClusterFinderMLEM.h.
|
staticprivate |
modified pad charge
Definition at line 126 of file AliMUONClusterFinderMLEM.h.
Referenced by GetModifiedFlag().
|
staticprivate |
do not kill (for pixels)
Definition at line 123 of file AliMUONClusterFinderMLEM.h.
Referenced by FindLocalMaxima(), GetMustKeepFlag(), MainLoop(), and MaskPeaks().
|
staticprivate |
processing is over
Definition at line 125 of file AliMUONClusterFinderMLEM.h.
Referenced by FindCluster(), GetOverFlag(), MainLoop(), and WorkOnPreCluster().
|
staticprivate |
should be used for fit
Definition at line 124 of file AliMUONClusterFinderMLEM.h.
Referenced by GetUseForFitFlag(), PadsInXandY(), and Simple().
|
staticprivate |
pad "basic" state
Definition at line 122 of file AliMUONClusterFinderMLEM.h.
Referenced by ComputeCoefficients(), FindCluster(), GetZeroFlag(), MainLoop(), Mlem(), PadsInXandY(), and WorkOnPreCluster().
|
private |
! histogram for local maxima search
Definition at line 149 of file AliMUONClusterFinderMLEM.h.
Referenced by FindCluster(), FindLocalMaxima(), and WorkOnPreCluster().
|
private |
! histogram for MLEM procedure
Definition at line 148 of file AliMUONClusterFinderMLEM.h.
Referenced by FindCOG(), MainLoop(), Simple(), and WorkOnPreCluster().
|
private |
! new segmentation
Definition at line 142 of file AliMUONClusterFinderMLEM.h.
Referenced by AddVirtualPad(), CheckPreclusterTwoCathodes(), and Prepare().
|
private |
! see AliMUONRecoParam
Definition at line 161 of file AliMUONClusterFinderMLEM.h.
Referenced by CheckPrecluster(), MainLoop(), Prepare(), and SetChargeHints().
|
private |
! see AliMUONRecoParam
Definition at line 160 of file AliMUONClusterFinderMLEM.h.
Referenced by AddVirtualPad(), CheckPreclusterTwoCathodes(), MainLoop(), Prepare(), and SetChargeHints().
|
private |
! see AliMUONRecoParam
Definition at line 159 of file AliMUONClusterFinderMLEM.h.
Referenced by AddBinSimple(), AddVirtualPad(), FindLocalMaxima(), FindNearest(), MainLoop(), Prepare(), and SetChargeHints().
|
private |
! number of clusters for which we added virtual pads
Definition at line 157 of file AliMUONClusterFinderMLEM.h.
Referenced by ~AliMUONClusterFinderMLEM().
|
private |
! total number of clusters
Definition at line 156 of file AliMUONClusterFinderMLEM.h.
Referenced by ~AliMUONClusterFinderMLEM().
|
private |
! collection of pixels
Definition at line 151 of file AliMUONClusterFinderMLEM.h.
Referenced by AddBinSimple(), BuildPixArray(), BuildPixArrayOneCathode(), CheckOverlaps(), ComputeCoefficients(), FindCluster(), FindLocalMaxima(), FindNearest(), MainLoop(), MaskPeaks(), Mlem(), NextCluster(), Paint(), Pixel(), Prepare(), RemovePixel(), Simple(), WorkOnPreCluster(), and ~AliMUONClusterFinderMLEM().
|
private |
! whether we should plot thing (for debug only, quite slow!)
Definition at line 153 of file AliMUONClusterFinderMLEM.h.
|
private |
! current pre-cluster
Definition at line 135 of file AliMUONClusterFinderMLEM.h.
Referenced by CheckPreclusterTwoCathodes(), NextCluster(), Paint(), Print(), and WorkOnPreCluster().
|
private |
! the pre-clustering worker
Definition at line 134 of file AliMUONClusterFinderMLEM.h.
Referenced by NextCluster(), Prepare(), and ~AliMUONClusterFinderMLEM().
|
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().