#ifndef ALIMUONCLUSTERFINDERPEAKCOG_H
#define ALIMUONCLUSTERFINDERPEAKCOG_H
#include "AliMUONVClusterFinder.h"
#ifndef ROOT_TObjArray
# include "TObjArray.h"
#endif
#ifndef ROOT_TVector2
# include "TVector2.h"
#endif
class AliMUONPad;
class TH2D;
class AliMUONClusterFinderPeakCOG : public AliMUONVClusterFinder
{
public:
AliMUONClusterFinderPeakCOG(Bool_t plot, AliMUONVClusterFinder* clusterFinder);
virtual ~AliMUONClusterFinderPeakCOG();
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* seg[2]);
virtual AliMUONCluster* NextCluster();
virtual void Print(Option_t* opt="") const;
private:
AliMUONClusterFinderPeakCOG(const AliMUONClusterFinderPeakCOG& rhs);
AliMUONClusterFinderPeakCOG& operator=(const AliMUONClusterFinderPeakCOG& rhs);
Bool_t WorkOnPreCluster();
AliMUONCluster* CheckPrecluster(const AliMUONCluster& cluster);
AliMUONCluster* CheckPreclusterTwoCathodes(AliMUONCluster* cluster);
Bool_t Overlap(const AliMUONPad& pad, const AliMUONPad& pixel);
void BuildPixArray(AliMUONCluster& cluster);
void BuildPixArrayOneCathode(AliMUONCluster& cluster);
void PadOverHist(Int_t idir, Int_t ix0, Int_t iy0, AliMUONPad *pad, TH2D *h1, TH2D *h2);
void RemovePixel(Int_t i);
AliMUONPad* Pixel(Int_t i) const;
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 PadsInXandY(AliMUONCluster& cluster, Int_t &nInX, Int_t &nInY) const;
void CheckOverlaps();
private:
static const Int_t fgkZero;
static const Int_t fgkMustKeep;
static const Int_t fgkUseForFit;
static const Int_t fgkOver;
static const Int_t fgkModified;
static const Int_t fgkCoupled;
static const Double_t fgkZeroSuppression;
static const Double_t fgkDistancePrecision;
static const TVector2 fgkIncreaseSize;
static const TVector2 fgkDecreaseSize;
AliMUONVClusterFinder* fPreClusterFinder;
AliMUONCluster* fPreCluster;
TObjArray fClusterList;
Int_t fEventNumber;
Int_t fDetElemId;
Int_t fClusterNumber;
const AliMpVSegmentation *fkSegmentation[2];
TH2D *fHistAnode;
TObjArray* fPixArray;
Int_t fDebug;
Bool_t fPlot;
Int_t fNClusters;
Int_t fNAddVirtualPads;
ClassDef(AliMUONClusterFinderPeakCOG,0)
};
#endif
AliMUONClusterFinderPeakCOG.h:1 AliMUONClusterFinderPeakCOG.h:2 AliMUONClusterFinderPeakCOG.h:3 AliMUONClusterFinderPeakCOG.h:4 AliMUONClusterFinderPeakCOG.h:5 AliMUONClusterFinderPeakCOG.h:6 AliMUONClusterFinderPeakCOG.h:7 AliMUONClusterFinderPeakCOG.h:8 AliMUONClusterFinderPeakCOG.h:9 AliMUONClusterFinderPeakCOG.h:10 AliMUONClusterFinderPeakCOG.h:11 AliMUONClusterFinderPeakCOG.h:12 AliMUONClusterFinderPeakCOG.h:13 AliMUONClusterFinderPeakCOG.h:14 AliMUONClusterFinderPeakCOG.h:15 AliMUONClusterFinderPeakCOG.h:16 AliMUONClusterFinderPeakCOG.h:17 AliMUONClusterFinderPeakCOG.h:18 AliMUONClusterFinderPeakCOG.h:19 AliMUONClusterFinderPeakCOG.h:20 AliMUONClusterFinderPeakCOG.h:21 AliMUONClusterFinderPeakCOG.h:22 AliMUONClusterFinderPeakCOG.h:23 AliMUONClusterFinderPeakCOG.h:24 AliMUONClusterFinderPeakCOG.h:25 AliMUONClusterFinderPeakCOG.h:26 AliMUONClusterFinderPeakCOG.h:27 AliMUONClusterFinderPeakCOG.h:28 AliMUONClusterFinderPeakCOG.h:29 AliMUONClusterFinderPeakCOG.h:30 AliMUONClusterFinderPeakCOG.h:31 AliMUONClusterFinderPeakCOG.h:32 AliMUONClusterFinderPeakCOG.h:33 AliMUONClusterFinderPeakCOG.h:34 AliMUONClusterFinderPeakCOG.h:35 AliMUONClusterFinderPeakCOG.h:36 AliMUONClusterFinderPeakCOG.h:37 AliMUONClusterFinderPeakCOG.h:38 AliMUONClusterFinderPeakCOG.h:39 AliMUONClusterFinderPeakCOG.h:40 AliMUONClusterFinderPeakCOG.h:41 AliMUONClusterFinderPeakCOG.h:42 AliMUONClusterFinderPeakCOG.h:43 AliMUONClusterFinderPeakCOG.h:44 AliMUONClusterFinderPeakCOG.h:45 AliMUONClusterFinderPeakCOG.h:46 AliMUONClusterFinderPeakCOG.h:47 AliMUONClusterFinderPeakCOG.h:48 AliMUONClusterFinderPeakCOG.h:49 AliMUONClusterFinderPeakCOG.h:50 AliMUONClusterFinderPeakCOG.h:51 AliMUONClusterFinderPeakCOG.h:52 AliMUONClusterFinderPeakCOG.h:53 AliMUONClusterFinderPeakCOG.h:54 AliMUONClusterFinderPeakCOG.h:55 AliMUONClusterFinderPeakCOG.h:56 AliMUONClusterFinderPeakCOG.h:57 AliMUONClusterFinderPeakCOG.h:58 AliMUONClusterFinderPeakCOG.h:59 AliMUONClusterFinderPeakCOG.h:60 AliMUONClusterFinderPeakCOG.h:61 AliMUONClusterFinderPeakCOG.h:62 AliMUONClusterFinderPeakCOG.h:63 AliMUONClusterFinderPeakCOG.h:64 AliMUONClusterFinderPeakCOG.h:65 AliMUONClusterFinderPeakCOG.h:66 AliMUONClusterFinderPeakCOG.h:67 AliMUONClusterFinderPeakCOG.h:68 AliMUONClusterFinderPeakCOG.h:69 AliMUONClusterFinderPeakCOG.h:70 AliMUONClusterFinderPeakCOG.h:71 AliMUONClusterFinderPeakCOG.h:72 AliMUONClusterFinderPeakCOG.h:73 AliMUONClusterFinderPeakCOG.h:74 AliMUONClusterFinderPeakCOG.h:75 AliMUONClusterFinderPeakCOG.h:76 AliMUONClusterFinderPeakCOG.h:77 AliMUONClusterFinderPeakCOG.h:78 AliMUONClusterFinderPeakCOG.h:79 AliMUONClusterFinderPeakCOG.h:80 AliMUONClusterFinderPeakCOG.h:81 AliMUONClusterFinderPeakCOG.h:82 AliMUONClusterFinderPeakCOG.h:83 AliMUONClusterFinderPeakCOG.h:84 AliMUONClusterFinderPeakCOG.h:85 AliMUONClusterFinderPeakCOG.h:86 AliMUONClusterFinderPeakCOG.h:87 AliMUONClusterFinderPeakCOG.h:88 AliMUONClusterFinderPeakCOG.h:89 AliMUONClusterFinderPeakCOG.h:90 AliMUONClusterFinderPeakCOG.h:91 AliMUONClusterFinderPeakCOG.h:92 AliMUONClusterFinderPeakCOG.h:93 AliMUONClusterFinderPeakCOG.h:94 AliMUONClusterFinderPeakCOG.h:95 AliMUONClusterFinderPeakCOG.h:96 AliMUONClusterFinderPeakCOG.h:97 AliMUONClusterFinderPeakCOG.h:98 AliMUONClusterFinderPeakCOG.h:99 AliMUONClusterFinderPeakCOG.h:100 AliMUONClusterFinderPeakCOG.h:101 AliMUONClusterFinderPeakCOG.h:102 AliMUONClusterFinderPeakCOG.h:103 AliMUONClusterFinderPeakCOG.h:104 AliMUONClusterFinderPeakCOG.h:105 AliMUONClusterFinderPeakCOG.h:106 AliMUONClusterFinderPeakCOG.h:107 AliMUONClusterFinderPeakCOG.h:108 AliMUONClusterFinderPeakCOG.h:109 AliMUONClusterFinderPeakCOG.h:110 AliMUONClusterFinderPeakCOG.h:111 AliMUONClusterFinderPeakCOG.h:112 AliMUONClusterFinderPeakCOG.h:113 AliMUONClusterFinderPeakCOG.h:114