]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONClusterFinderAZ.h
Make this class non static, correct a bug (float instead of double) in ReadPCB, and...
[u/mrichter/AliRoot.git] / MUON / AliMUONClusterFinderAZ.h
index f90a5c750e2dd6e03dfd73e535d205834d7a7315..019ccf7a0ae47ea97acce2d4926b085f84751819 100644 (file)
@@ -4,23 +4,22 @@
  * See cxx source for full Copyright notice                               */
 
 /* $Id$ */
-// Revision of includes 07/05/2004
 
 /// \ingroup rec
 /// \class AliMUONClusterFinderAZ
 /// \brief Cluster finder in MUON arm of ALICE
-
-#include "AliMUONClusterFinderVS.h"
+///
+/// \author Alexander Zinchenko, JINR Dubna
 
 class TH2D;
 class TClonesArray;
 class TMinuit;
-class TMatrixD;
 
-class AliSegmentation;
-class AliMUONResponse;
+class AliMUONVGeometryDESegmentation;
 class AliMUONPixel;
 class AliMUONClusterDrawAZ;
+#include "AliMUONClusterFinderVS.h"
+#include "TMatrixDfwd.h"
 
 class AliMUONClusterFinderAZ : public AliMUONClusterFinderVS 
 {
@@ -34,48 +33,44 @@ public:
   Int_t    GetNPads(Int_t cath) const { return fnPads[cath]; }
   Int_t    GetIJ(Int_t indx, Int_t iPad) const { return fPadIJ[indx][iPad]; }
   Float_t  GetXyq(Int_t indx, Int_t iPad) const { return fXyq[indx][iPad]; }
-  Float_t  GetZpad() { return fZpad; }
+  Float_t  GetZpad() const { return fZpad; }
   Bool_t GetUsed(Int_t cath, Int_t dig) const { return fUsed[cath][dig]; }
   void SetUsed(Int_t cath, Int_t dig) { fUsed[cath][dig] = kTRUE; } // mark used digits
   void SetUnused(Int_t cath, Int_t dig) { fUsed[cath][dig] = kFALSE; } // unmark digits
   void SetReco(Int_t iReco) { fReco = iReco; } // set reco flag
   void SetStart(Int_t iCath, Int_t iPad) { fCathBeg = iCath; fPadBeg[0] = fPadBeg[1] = 0; fPadBeg[fCathBeg] = iPad; } // start
  
-protected:
-  AliMUONClusterFinderAZ(const AliMUONClusterFinderAZ& rhs);
-  AliMUONClusterFinderAZ& operator=(const AliMUONClusterFinderAZ& rhs);
-
- private:
+private:
   // Some constants
-  static const Int_t fgkDim = 10000; // array size
-  static const Double_t fgkCouplMin; // threshold on coupling 
-
-  static  AliMUONClusterFinderAZ* fgClusterFinder; // the ClusterFinderAZ instance
-
-  Int_t      fnPads[2];         // ! number of pads in the cluster on 2 cathodes
-  Float_t    fXyq[7][fgkDim];   // ! pad information
-  Int_t      fPadIJ[2][fgkDim]; // ! pad information
-  AliMUONGeometrySegmentation *fSegmentation[2]; // ! new segmentation
-  AliMUONResponse *fResponse;   // ! response
-  Float_t    fZpad;             // ! z-coordinate of the hit
-  Int_t      fNpar;             // ! number of fit parameters
-  Double_t   fQtot;             // ! total cluster charge
-  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)
-
-  static     TMinuit* fgMinuit; // ! Fitter
-  Bool_t     fUsed[2][fgkDim]; // ! flags for used pads
-  //TH2F*      fHist[4]; // ! histograms
-  AliMUONClusterDrawAZ *fDraw; // ! drawing object 
-  //Int_t      fnMu; // ! number of muons passing thru the selected area
-  //Double_t   fxyMu[2][7]; // ! muon information
-  TObjArray* fPixArray; // ! collection of pixels
-  Int_t fnCoupled; // ! number of coupled clusters in precluster
-  Int_t fDebug; // ! debug level
+  static const Int_t fgkDim = 10000; ///< array size
+  static const Double_t fgkCouplMin; ///< threshold on coupling 
+  static const Double_t fgkZeroSuppression; ///< average zero suppression value
+  static const Double_t fgkSaturation; ///< average saturation level
+
+  static  AliMUONClusterFinderAZ* fgClusterFinder; ///< the ClusterFinderAZ instance
+
+  Int_t      fnPads[2];         //!< number of pads in the cluster on 2 cathodes
+  Float_t    fXyq[7][fgkDim];   //!< pad information
+  Int_t      fPadIJ[4][fgkDim]; //!< pad information
+  AliMUONVGeometryDESegmentation *fSegmentation[2]; //!< new segmentation
+  Float_t    fZpad;             //!< z-coordinate of the hit
+  Int_t      fNpar;             //!< number of fit parameters
+  Double_t   fQtot;             //!< total cluster charge
+  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)
+
+  static     TMinuit* fgMinuit; //!< Fitter
+  Bool_t     fUsed[2][fgkDim]; //!< flags for used pads
+  AliMUONClusterDrawAZ *fDraw; //!< drawing object 
+  TObjArray* fPixArray; //!< collection of pixels
+  Int_t fnCoupled; //!< number of coupled clusters in precluster
+  Int_t fDebug; //!< debug level
 
   // Functions
 
+  AliMUONClusterFinderAZ(const AliMUONClusterFinderAZ& rhs);
+  AliMUONClusterFinderAZ& operator=(const AliMUONClusterFinderAZ& rhs);
   void   AddPad(Int_t cath, Int_t digit); // add a pad to the cluster
   Bool_t Overlap(Int_t cath, AliMUONDigit *dig); // check if the pad from one cathode overlaps with a pad in the cluster on the other cathode
   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
@@ -94,10 +89,10 @@ protected:
   Double_t MinGroupCoupl(Int_t nCoupled, Int_t *clustNumb, TMatrixD *aijcluclu, Int_t *minGroup); // find group of cluster with min. coupling to others
   Int_t  SelectPad(Int_t nCoupled, Int_t nForFit, Int_t *clustNumb, Int_t *clustFit, TMatrixD *aijcluclu); //select pads for fit
   void   Merge(Int_t nForFit, Int_t nCoupled, Int_t *clustNumb, Int_t *clustFit, TObjArray **clusters, TMatrixD *aijcluclu, TMatrixD *aijclupad); // merge clusters
-  Int_t  Fit(Int_t nfit, Int_t *clustFit, TObjArray **clusters, Double_t *parOk); // do the fitting 
+  Int_t  Fit(Int_t iSimple, Int_t nfit, Int_t *clustFit, TObjArray **clusters, Double_t *parOk); // do the fitting 
   void  UpdatePads(Int_t nfit, Double_t *par); // subtract fitted charges from pads
   void  AddRawCluster(Double_t x, Double_t y, Double_t qTot, Double_t fmin, Int_t nfit, Int_t *tracks, Double_t sigx, Double_t sigy, Double_t dist); // add new reconstructed cluster
-  Int_t FindLocalMaxima(Int_t *localMax, Double_t *maxVal); // find local maxima 
+  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(Int_t *localMax, Int_t iMax); // find cluster around local max
   void  AddVirtualPad(); // add virtual pads for some clusters (if necessary)