]>
Commit | Line | Data |
---|---|---|
0df3ca52 | 1 | #ifndef ALIMUONCLUSTERFINDERAZ_H |
2 | #define ALIMUONCLUSTERFINDERAZ_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
30178c30 | 6 | /* $Id$ */ |
7 | // Revision of includes 07/05/2004 | |
8 | ||
9 | #include "AliMUONClusterFinderVS.h" | |
10 | ||
0df3ca52 | 11 | class TH2F; |
12 | class TH2D; | |
13 | class TClonesArray; | |
0df3ca52 | 14 | class TMinuit; |
15 | class TMatrixD; | |
0df3ca52 | 16 | |
30178c30 | 17 | class AliSegmentation; |
18 | class AliMUONResponse; | |
19 | class AliMUONPixel; | |
0df3ca52 | 20 | |
30178c30 | 21 | class AliMUONClusterFinderAZ : public AliMUONClusterFinderVS |
22 | { | |
23 | public: | |
24 | AliMUONClusterFinderAZ(Bool_t draw = 0, Int_t iReco = 0);// Constructor | |
0df3ca52 | 25 | virtual ~AliMUONClusterFinderAZ(); // Destructor |
26 | ||
9e993f2a | 27 | void FindRawClusters(); // the same interface as for old cluster finder |
28 | void EventLoop(Int_t nev, Int_t ch); // first event | |
30178c30 | 29 | Bool_t TestTrack(Int_t t) const; // test if track was selected |
9e993f2a | 30 | |
31 | protected: | |
74f7bbc5 | 32 | AliMUONClusterFinderAZ(const AliMUONClusterFinderAZ& rhs); |
33 | AliMUONClusterFinderAZ& operator=(const AliMUONClusterFinderAZ& rhs); | |
0df3ca52 | 34 | |
35 | private: | |
343146bf | 36 | // Some constants |
37 | static const Int_t fgkDim = 2000; // array size | |
38 | static const Double_t fgkCouplMin; // threshold on coupling | |
39 | ||
74f7bbc5 | 40 | static AliMUONClusterFinderAZ* fgClusterFinder; // the ClusterFinderAZ instance |
9e993f2a | 41 | |
42 | Int_t fnPads[2]; // ! number of pads in the cluster on 2 cathodes | |
343146bf | 43 | Float_t fXyq[6][fgkDim]; // ! pad information |
44 | Int_t fPadIJ[2][fgkDim]; // ! pad information | |
9e993f2a | 45 | AliSegmentation *fSegmentation[2]; // ! segmentation |
46 | AliMUONResponse *fResponse;// ! response | |
47 | Float_t fZpad; // ! z-coordinate of the hit | |
48 | Int_t fNpar; // ! number of fit parameters | |
49 | Double_t fQtot; // ! total cluster charge | |
50 | Int_t fReco; // ! =1 if run reco with writing to TreeR | |
51 | ||
52 | static TMinuit* fgMinuit; // ! Fitter | |
343146bf | 53 | Bool_t fUsed[2][fgkDim]; // ! flags for used pads |
9e993f2a | 54 | TH2F* fHist[4]; // ! histograms |
0df3ca52 | 55 | TClonesArray *fMuonDigits; // ! pointer to digits |
9e993f2a | 56 | Bool_t fDraw; // ! draw flag |
57 | Int_t fnMu; // number of muons passing thru the selected area | |
58 | Double_t fxyMu[2][7]; // ! muon information | |
59 | TObjArray* fPixArray; // collection of pixels | |
0df3ca52 | 60 | |
61 | // Functions | |
62 | ||
9e993f2a | 63 | void ModifyHistos(void); // modify histograms |
64 | void AddPad(Int_t cath, Int_t digit); // add a pad to the cluster | |
0df3ca52 | 65 | Bool_t Overlap(Int_t cath, TObject *dig); // check if the pad from one cathode overlaps with a pad in the cluster on the other cathode |
66 | Bool_t Overlap(Float_t *xy1, Int_t iPad, Float_t *xy12, Int_t iSkip); // check if pads xy1 and iPad overlap and return overlap area | |
67 | Bool_t CheckPrecluster(Int_t *nShown); // check precluster to simplify it (if possible) | |
9e993f2a | 68 | void BuildPixArray(); // build array of pixels |
69 | void AjustPixel(Float_t width, Int_t ixy); // ajust size of small pixels | |
70 | void AjustPixel(Float_t wxmin, Float_t wymin); // ajust size of large pixels | |
0df3ca52 | 71 | Bool_t MainLoop(); // repeat MLEM algorithm until pixels become sufficiently small |
9e993f2a | 72 | void Mlem(Double_t *coef, Double_t *probi); // use MLEM for cluster finding |
73 | void FindCOG(TH2D *mlem, Double_t *xyc); // find COG position around maximum bin | |
74 | Int_t FindNearest(AliMUONPixel *pixPtr0); // find nearest neighbouring pixel to the given one | |
75 | void Split(TH2D *mlem, Double_t *coef); // steering function for pixels | |
76 | void AddBin(TH2D *mlem, Int_t ic, Int_t jc, Int_t mode, Bool_t* used, TObjArray *pix); // add a bin to the cluster | |
0df3ca52 | 77 | TObject* BinToPix(TH2D *mlem, Int_t jc, Int_t ic); // hist. bin-to-pixel |
9e993f2a | 78 | void AddCluster(Int_t ic, Int_t nclust, TMatrixD *aijcluclu, Bool_t *used, Int_t *clustNumb, Int_t &nCoupled); // add a cluster to the group of coupled clusters |
c1aed84f | 79 | Double_t MinGroupCoupl(Int_t nCoupled, Int_t *clustNumb, TMatrixD *aijcluclu, Int_t *minGroup); // find group of cluster with min. coupling to others |
9e993f2a | 80 | Int_t SelectPad(Int_t nCoupled, Int_t nForFit, Int_t *clustNumb, Int_t *clustFit, TMatrixD *aijcluclu); //select pads for fit |
81 | void Merge(Int_t nForFit, Int_t nCoupled, Int_t *clustNumb, Int_t *clustFit, TObjArray **clusters, TMatrixD *aijcluclu, TMatrixD *aijclupad); // merge clusters | |
82 | Int_t Fit(Int_t nfit, Int_t *clustFit, TObjArray **clusters, Double_t *parOk); // do the fitting | |
83 | void UpdatePads(Int_t nfit, Double_t *par); // subtract fitted charges from pads | |
84 | void AddRawCluster(Double_t x, Double_t y, Double_t fmin); // add new raw cluster | |
0df3ca52 | 85 | Int_t FindLocalMaxima(Int_t *localMax, Double_t *maxVal); // find local maxima |
9e993f2a | 86 | void FlagLocalMax(TH2D *hist, Int_t i, Int_t j, Int_t *isLocalMax); // flag local max |
87 | void FindCluster(Int_t *localMax, Int_t iMax); // find cluster around local max | |
88 | // This function is used for fitting | |
30178c30 | 89 | void Fcn1(Int_t &npar, Double_t *gin, Double_t &f, Double_t *par, Int_t iflag); |
0df3ca52 | 90 | |
91 | ClassDef(AliMUONClusterFinderAZ,0) // cluster finder in MUON arm of ALICE | |
74f7bbc5 | 92 | }; |
93 | ||
0df3ca52 | 94 | #endif |