X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=MUON%2FAliMUONClusterFinderMLEM.h;h=6267687d2daefdf064077284b09ff392803e8ddd;hb=cb68eb1dcfd3de8db67f3a70a7bace802e704d50;hp=05f71b4b54c5ca826d389e3ab1d58ef4fa1c42f7;hpb=2abdae6e20a296abde062cc695230f47624f0451;p=u%2Fmrichter%2FAliRoot.git diff --git a/MUON/AliMUONClusterFinderMLEM.h b/MUON/AliMUONClusterFinderMLEM.h index 05f71b4b54c..6267687d2da 100644 --- a/MUON/AliMUONClusterFinderMLEM.h +++ b/MUON/AliMUONClusterFinderMLEM.h @@ -13,7 +13,6 @@ // class TH2D; -class TClonesArray; class TMinuit; #ifndef ROOT_TObjArray @@ -35,15 +34,38 @@ public: AliMUONClusterFinderMLEM(Bool_t plot, AliMUONVClusterFinder* clusterFinder); // Constructor virtual ~AliMUONClusterFinderMLEM(); // Destructor - virtual Bool_t Prepare(const AliMpVSegmentation* segmentations[2], - const AliMUONVDigitStore& digitStore); + virtual Bool_t NeedSegmentation() const { return kTRUE; } + + using AliMUONVClusterFinder::Prepare; + + 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=""); + // Status flags for pads + + /// Return pad "basic" state flag + static Int_t GetZeroFlag() { return fgkZero; } + /// Return do not kill flag + static Int_t GetMustKeepFlag() { return fgkMustKeep; } + /// Return should be used for fit flag + static Int_t GetUseForFitFlag() { return fgkUseForFit; } + /// Return processing is over flag + static Int_t GetOverFlag() { return fgkOver; } + /// Return modified pad charge flag + static Int_t GetModifiedFlag() { return fgkModified; } + /// Return coupled pad flag + static Int_t GetCoupledFlag() { return fgkCoupled; } + private: /// Not implemented AliMUONClusterFinderMLEM(const AliMUONClusterFinderMLEM& rhs); @@ -62,26 +84,23 @@ private: /// build array of pixels void BuildPixArray(AliMUONCluster& cluster); void BuildPixArrayOneCathode(AliMUONCluster& cluster); - void BuildPixArrayTwoCathodes(AliMUONCluster& cluster); - void PadOverHist(Int_t idir, Int_t ix0, Int_t iy0, AliMUONPad *pad); + 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; - void AdjustPixel(AliMUONCluster& cluster, Float_t width, Int_t ixy); // adjust size of small pixels - void AdjustPixel(Double_t wxmin, Double_t wymin); // adjust size of large pixels - Bool_t MainLoop(AliMUONCluster& cluster, Int_t iSimple); // repeat MLEM algorithm until pixels become sufficiently small - void Mlem(AliMUONCluster& cluster, Double_t *coef, Double_t *probi, Int_t nIter); // use MLEM for cluster finding + void Mlem(AliMUONCluster& cluster, const Double_t *coef, Double_t *probi, Int_t nIter); // use MLEM for cluster finding - void FindCOG(TH2D *mlem, Double_t *xyc); // find COG position around maximum bin - Int_t FindNearest(AliMUONPad *pixPtr0); // find nearest neighbouring pixel to the given one + void FindCOG(Double_t *xyc); // find COG position around maximum bin + Int_t FindNearest(const AliMUONPad *pixPtr0); // find nearest neighbouring pixel to the given one Int_t FindLocalMaxima(TObjArray *pixArray, Int_t *localMax, Double_t *maxVal); // find local maxima void FlagLocalMax(TH2D *hist, Int_t i, Int_t j, Int_t *isLocalMax); // flag local max - void FindCluster(AliMUONCluster& cluster, Int_t *localMax, Int_t iMax); // find cluster around local max + void FindCluster(AliMUONCluster& cluster, const Int_t *localMax, Int_t iMax); // find cluster around local max void AddVirtualPad(AliMUONCluster& cluster); // add virtual pads for some clusters (if necessary) void PadsInXandY(AliMUONCluster& cluster, Int_t &nInX, Int_t &nInY) const; // get number of pads in X and Y @@ -89,10 +108,6 @@ private: /// Process simple cluster void Simple(AliMUONCluster& cluster); - void Neighbours(Int_t cath, Int_t ix0, Int_t iy0, - Int_t& nn, - Int_t* xList, Int_t* yList); - void Plot(const char* outputfile); void ComputeCoefficients(AliMUONCluster& cluster, @@ -100,13 +115,18 @@ private: void CheckOverlaps(); void AddBinSimple(TH2D *mlem, Int_t ic, Int_t jc); + void MaskPeaks(Int_t mask); private: - + // Status flags for pads + static const Int_t fgkZero; ///< pad "basic" state + static const Int_t fgkMustKeep; ///< do not kill (for pixels) + static const Int_t fgkUseForFit; ///< should be used for fit + static const Int_t fgkOver; ///< processing is over + static const Int_t fgkModified; ///< modified pad charge + static const Int_t fgkCoupled; ///< coupled pad + // Some constants - static const Int_t fgkDim = 10000; ///< array size - static const Double_t fgkZeroSuppression; ///< average zero suppression value - static const Double_t fgkSaturation; ///< average saturation level static const Double_t fgkDistancePrecision; ///< used to check overlaps and so on static const TVector2 fgkIncreaseSize; ///< idem static const TVector2 fgkDecreaseSize; ///< idem @@ -119,14 +139,14 @@ private: Int_t fDetElemId; //!< current DE being processed Int_t fClusterNumber; //!< current cluster number - const AliMpVSegmentation *fSegmentation[2]; //!< new segmentation + const AliMpVSegmentation *fkSegmentation[2]; //!< new segmentation - Float_t fZpad; //!< z-coordinate of the hit - Int_t fReco; //!< !=0 if run reco with writing of reconstructed clusters - Int_t fCathBeg; //!< starting cathode (for combined cluster / track reco) - Int_t fPadBeg[2]; //!< starting pads (for combined cluster / track reco) + //Int_t fCathBeg; //!< starting cathode (for combined cluster / track reco) + //Int_t fPadBeg[2]; //!< starting pads (for combined cluster / track reco) - static TMinuit* fgMinuit; //!< Fitter + //static TMinuit* fgMinuit; //!< Fitter + TH2D *fHistMlem; //!< histogram for MLEM procedure + TH2D *fHistAnode; //!< histogram for local maxima search TObjArray* fPixArray; //!< collection of pixels Int_t fDebug; //!< debug level @@ -136,6 +156,10 @@ private: Int_t fNClusters; //!< total number of clusters Int_t fNAddVirtualPads; //!< number of clusters for which we added virtual pads + Double_t fLowestPixelCharge; //!< see AliMUONRecoParam + Double_t fLowestPadCharge; //!< see AliMUONRecoParam + Double_t fLowestClusterCharge; //!< see AliMUONRecoParam + ClassDef(AliMUONClusterFinderMLEM,0) // cluster finder in MUON arm of ALICE };