ROOT logo
AliRoot » MUON » AliMUONClusterFinderMLEM

class AliMUONClusterFinderMLEM: public AliMUONVClusterFinder

 \class AliMUONClusterFinderMLEM

 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 ;-)

Function Members (Methods)

public:
AliMUONClusterFinderMLEM(Bool_t plot, AliMUONVClusterFinder* clusterFinder)
virtual~AliMUONClusterFinderMLEM()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
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
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
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
static Int_tGetCoupledFlag()
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
static Int_tGetModifiedFlag()
static Int_tGetMustKeepFlag()
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
static Int_tGetOverFlag()
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
static Int_tGetUseForFitFlag()
static Int_tGetZeroFlag()
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
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
voidTObject::MayNotUse(const char* method) const
virtual Bool_tNeedSegmentation() const
virtual AliMUONCluster*NextCluster()
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
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)
virtual voidPaint(Option_t* opt = "")
virtual voidTObject::Pop()
virtual Bool_tPrepare(Int_t detElemId, TObjArray** pads, const AliMpArea& area, const AliMpVSegmentation** segmentations)
virtual voidPrint(Option_t* opt = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
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 voidSetChargeHints(Double_t lowestPadCharge, Double_t lowestClusterCharge)
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&)
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual Bool_tAliMUONVClusterFinder::UsePad(const AliMUONPad& pad)
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
voidTObject::MakeZombie()
private:
AliMUONClusterFinderMLEM(const AliMUONClusterFinderMLEM& rhs)
voidAddBinSimple(TH2D* mlem, Int_t ic, Int_t jc)
voidAddVirtualPad(AliMUONCluster& cluster)
voidBuildPixArray(AliMUONCluster& cluster)
voidBuildPixArrayOneCathode(AliMUONCluster& cluster)
voidCheckOverlaps()
AliMUONCluster*CheckPrecluster(const AliMUONCluster& cluster)
AliMUONCluster*CheckPreclusterTwoCathodes(AliMUONCluster* cluster)
voidComputeCoefficients(AliMUONCluster& cluster, Double_t* coef, Double_t* probi)
voidFindCluster(AliMUONCluster& cluster, const Int_t* localMax, Int_t iMax)
voidFindCOG(Double_t* xyc)
Int_tFindLocalMaxima(TObjArray* pixArray, Int_t* localMax, Double_t* maxVal)
Int_tFindNearest(const AliMUONPad* pixPtr0)
voidFlagLocalMax(TH2D* hist, Int_t i, Int_t j, Int_t* isLocalMax)
Bool_tMainLoop(AliMUONCluster& cluster, Int_t iSimple)
voidMaskPeaks(Int_t mask)
voidMlem(AliMUONCluster& cluster, const Double_t* coef, Double_t* probi, Int_t nIter)
AliMUONClusterFinderMLEM&operator=(const AliMUONClusterFinderMLEM& rhs)
Bool_tOverlap(const AliMUONPad& pad, const AliMUONPad& pixel)
voidPadOverHist(Int_t idir, Int_t ix0, Int_t iy0, AliMUONPad* pad, TH2D* hist1, TH2D* hist2)
voidPadsInXandY(AliMUONCluster& cluster, Int_t& nInX, Int_t& nInY) const
AliMUONPad*Pixel(Int_t i) const
voidPlot(const char* outputfile)
voidRemovePixel(Int_t i)
voidSimple(AliMUONCluster& cluster)
Bool_tWorkOnPreCluster()

Data Members

private:
TObjArrayfClusterList!< clusters corresponding to the current pre-cluster
Int_tfClusterNumber!< current cluster number
Int_tfDebug!< debug level
Int_tfDetElemId!< current DE being processed
Int_tfEventNumber!< current event being processed
TH2D*fHistAnode!< histogram for local maxima search
TH2D*fHistMlem!< histogram for MLEM procedure
Double_tfLowestClusterCharge!< see AliMUONRecoParam
Double_tfLowestPadCharge!< see AliMUONRecoParam
Double_tfLowestPixelCharge!< see AliMUONRecoParam
Int_tfNAddVirtualPads!< number of clusters for which we added virtual pads
Int_tfNClusters!< total number of clusters
TObjArray*fPixArray!< collection of pixels
Bool_tfPlot!< whether we should plot thing (for debug only, quite slow!)
AliMUONCluster*fPreCluster!< current pre-cluster
AliMUONVClusterFinder*fPreClusterFinder!< the pre-clustering worker
AliMUONClusterSplitterMLEM*fSplitter!< helper class to go from pixel arrays to clusters
static const Int_tfgkCoupled/< coupled pad
static const TVector2fgkDecreaseSize/< idem
static const Double_tfgkDistancePrecision/< used to check overlaps and so on
static const TVector2fgkIncreaseSize/< idem
static const Int_tfgkModified/< modified pad charge
static const Int_tfgkMustKeep/< do not kill (for pixels)
static const Int_tfgkOver/< processing is over
static const Int_tfgkUseForFit/< should be used for fit
static const Int_tfgkZero/< pad "basic" state
const AliMpVSegmentation*fkSegmentation[2]!< new segmentation

Class Charts

Inheritance Chart:
TObject
AliMUONVClusterFinder
AliMUONClusterFinderMLEM

Function documentation

AliMUONClusterFinderMLEM(Bool_t plot, AliMUONVClusterFinder* clusterFinder)
 Constructor
~AliMUONClusterFinderMLEM()
 Destructor
Prepare(Int_t detElemId, TObjArray** pads, const AliMpArea& area, const AliMpVSegmentation** segmentations)
 Prepare for clustering
  AliCodeTimerAuto("",0)
NextCluster()
 Return next cluster
  AliCodeTimerAuto("",0)
WorkOnPreCluster()
 Starting from a precluster, builds a pixel array, and then
 extract clusters from this array
Overlap(const AliMUONPad& pad, const AliMUONPad& pixel)
 Check if the pad and the pixel overlaps
CheckPrecluster(const AliMUONCluster& cluster)
 Check precluster in order to attempt to simplify it (mostly for
 two-cathode preclusters)
CheckPreclusterTwoCathodes(AliMUONCluster* cluster)
 Check two-cathode cluster
CheckOverlaps()
 For debug only : check if some pixels overlap...
void BuildPixArray(AliMUONCluster& cluster)
 Build pixel array for MLEM method
void BuildPixArrayOneCathode(AliMUONCluster& cluster)
 Build the pixel array
void PadOverHist(Int_t idir, Int_t ix0, Int_t iy0, AliMUONPad* pad, TH2D* hist1, TH2D* hist2)
 "Span" pad over histogram in the direction idir
Plot(const char* outputfile)
 Make a plot and save it as png
ComputeCoefficients(AliMUONCluster& cluster, Double_t* coef, Double_t* probi)
 Compute coefficients needed for MLEM algorithm
Bool_t MainLoop(AliMUONCluster& cluster, Int_t iSimple)
 Repeat MLEM algorithm until pixel size becomes sufficiently small
void MaskPeaks(Int_t mask)
 Mask/unmask pixels corresponding to local maxima (add/subtract 10000 to their charge
 - to avoid loosing low charge pixels after sorting)
void Mlem(AliMUONCluster& cluster, const Double_t* coef, Double_t* probi, Int_t nIter)
 Use MLEM to find pixel charges
void FindCOG(Double_t* xyc)
 Calculate position of the center-of-gravity around the maximum pixel
Int_t FindNearest(const AliMUONPad* pixPtr0)
 Find the pixel nearest to the given one
 (algorithm may be not very efficient)
Paint(Option_t* opt = "")
 Paint cluster and pixels
Int_t FindLocalMaxima(TObjArray* pixArray, Int_t* localMax, Double_t* maxVal)
 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
void FlagLocalMax(TH2D* hist, Int_t i, Int_t j, Int_t* isLocalMax)
 Flag pixels (whether or not local maxima)
void FindCluster(AliMUONCluster& cluster, const Int_t* localMax, Int_t iMax)
 Find pixel cluster around local maximum \a iMax and pick up pads
 overlapping with it
AddBinSimple(TH2D* mlem, Int_t ic, Int_t jc)
 Add adjacent bins (+-1 in X and Y) to the cluster
operator=(const AliMUONClusterFinderMLEM& rhs)
 Protected assignement operator
void AddVirtualPad(AliMUONCluster& cluster)
 Add virtual pad (with small charge) to improve fit for clusters
 with number of pads == 2 per direction
void PadsInXandY(AliMUONCluster& cluster, Int_t& nInX, Int_t& nInY) const
 Find number of pads in X and Y-directions (excluding virtual ones and
 overflows)
void RemovePixel(Int_t i)
 Remove pixel at index i
void Simple(AliMUONCluster& cluster)
 Process simple cluster (small number of pads) without EM-procedure
Pixel(Int_t i) const
 Returns pixel at index i
Print(Option_t* opt = "") const
 printout
SetChargeHints(Double_t lowestPadCharge, Double_t lowestClusterCharge)
 Set some thresholds we use later on in the algorithm
AliMUONClusterFinderMLEM(Bool_t plot, AliMUONVClusterFinder* clusterFinder)
Bool_t NeedSegmentation() const
{ return kTRUE; }
Int_t GetZeroFlag()
 Status flags for pads
 Return pad "basic" state flag
{ return fgkZero; }
Int_t GetMustKeepFlag()
 Return do not kill flag
{ return fgkMustKeep; }
Int_t GetUseForFitFlag()
 Return should be used for fit flag
{ return fgkUseForFit; }
Int_t GetOverFlag()
 Return processing is over flag
{ return fgkOver; }
Int_t GetModifiedFlag()
 Return modified pad charge flag
{ return fgkModified; }
Int_t GetCoupledFlag()
 Return coupled pad flag
{ return fgkCoupled; }