AliRoot Core  3abf5b4 (3abf5b4)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMUONClusterFinderPeakFit.h
Go to the documentation of this file.
1 #ifndef ALIMUONCLUSTERFINDERPEAKFIT_H
2 #define ALIMUONCLUSTERFINDERPEAKFIT_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice */
5 
6 /* $Id$ */
7 
12 // Author Alexander Zinchenko, JINR Dubna; Laurent Aphecetche, SUBATECH
13 //
14 
15 #include "AliMUONVClusterFinder.h"
16 
17 #ifndef ROOT_TObjArray
18 # include "TObjArray.h"
19 #endif
20 #ifndef ROOT_TVector2
21 # include "TVector2.h"
22 #endif
23 
24 class AliMUONMathieson;
25 //class AliMUONPad;
26 
27 class TH2D;
28 
30 {
31 public:
33  virtual ~AliMUONClusterFinderPeakFit(); // Destructor
34 
36  virtual Bool_t NeedSegmentation() const { return kTRUE; }
37 
39 
40  virtual Bool_t Prepare(Int_t detElemId, TObjArray* pads[2],
41  const AliMpArea& area, const AliMpVSegmentation* seg[2]);
42 
43  virtual AliMUONCluster* NextCluster();
44 
46  Int_t GetNMax() const { return fNMax; }
47 
48  virtual void Print(Option_t* opt="") const;
49 
50 private:
55 
56  Bool_t WorkOnPreCluster();
57 
61 
63  Bool_t Overlap(const AliMUONPad& pad, const AliMUONPad& pixel);
64 
66  void BuildPixArray(AliMUONCluster& cluster);
68  void PadOverHist(Int_t idir, Int_t ix0, Int_t iy0, AliMUONPad *pad, TH2D *h1, TH2D *h2);
69 
70  void RemovePixel(Int_t i);
71 
72  AliMUONPad* Pixel(Int_t i) const;
73 
74  Int_t FindLocalMaxima(TObjArray *pixArray, Int_t *localMax, Double_t *maxVal); // find local maxima
75  void FlagLocalMax(TH2D *hist, Int_t i, Int_t j, Int_t *isLocalMax); // flag local max
76  void FindClusterCOG(AliMUONCluster& cluster, const Int_t *localMax, Int_t iMax); // find cluster around local max with COG
77  void FindClusterFit(AliMUONCluster& cluster, const Int_t *localMax, const Int_t *maxPos, Int_t nMax); // find cluster around local max with fitting
78  void PadsInXandY(AliMUONCluster& cluster, Int_t &nInX, Int_t &nInY) const; // get number of pads in X and Y
79 
80  void CheckOverlaps();
81 
82 private:
83  // Status flags for pads
84  static const Int_t fgkZero;
85  static const Int_t fgkMustKeep;
86  static const Int_t fgkUseForFit;
87  static const Int_t fgkOver;
88  static const Int_t fgkModified;
89  static const Int_t fgkCoupled;
90 
91  // Some constants
92  static const Double_t fgkZeroSuppression;
93  static const Double_t fgkDistancePrecision;
94  static const TVector2 fgkIncreaseSize;
95  static const TVector2 fgkDecreaseSize;
96 
101 
102  Int_t fEventNumber;
103  Int_t fDetElemId;
105  Int_t fNMax;
106  TH2D *fHistAnode;
107 
109 
111  Int_t fDebug;
112  Bool_t fPlot;
113 
114  Int_t fNClusters;
116 
117  ClassDef(AliMUONClusterFinderPeakFit,0) // cluster finder in MUON arm of ALICE
118 };
119 
120 #endif
AliMUONCluster * CheckPrecluster(const AliMUONCluster &cluster)
Check precluster to simplify it (if possible), and return the simplified cluster. ...
void PadsInXandY(AliMUONCluster &cluster, Int_t &nInX, Int_t &nInY) const
Interface of a cluster finder.
static const Int_t fgkModified
modified pad charge
static const Int_t fgkUseForFit
should be used for fit
AliMUONClusterFinderPeakFit & operator=(const AliMUONClusterFinderPeakFit &rhs)
Not implemented.
Bool_t Overlap(const AliMUONPad &pad, const AliMUONPad &pixel)
Checks whether a pad and a pixel have an overlapping area.
void BuildPixArrayOneCathode(AliMUONCluster &cluster)
#define TObjArray
A group of adjacent pads.
Int_t fClusterNumber
! current cluster number
AliMUONCluster * CheckPreclusterTwoCathodes(AliMUONCluster *cluster)
virtual Bool_t NeedSegmentation() const
It needs segmentation.
Implementation of Mathieson response.
Int_t fNAddVirtualPads
! number of clusters for which we added virtual pads
A rectangle area positioned in plane..
Definition: AliMpArea.h:20
TH2D * fHistAnode
! histo for local maxima search
virtual void Print(Option_t *opt="") const
static const Double_t fgkDistancePrecision
used to check overlaps and so on
static const Int_t fgkOver
processing is over
Int_t fEventNumber
! current event being processed
virtual Bool_t Prepare(Int_t detElemId, TObjArray *pads[2], const AliMpArea &area)
AliMUONCluster * fPreCluster
! current pre-cluster
void PadOverHist(Int_t idir, Int_t ix0, Int_t iy0, AliMUONPad *pad, TH2D *h1, TH2D *h2)
return clusterFinder
virtual AliMUONCluster * NextCluster()
static const TVector2 fgkDecreaseSize
idem
static const Int_t fgkMustKeep
do not kill (for pixels)
static const Int_t fgkZero
pad "basic" state
void plot(const std::vector< TH1 * > &v, Double_t min, Double_t max, Double_t factor)
void FindClusterFit(AliMUONCluster &cluster, const Int_t *localMax, const Int_t *maxPos, Int_t nMax)
Int_t fDetElemId
! current DE being processed
virtual Bool_t Prepare(Int_t detElemId, TObjArray *pads[2], const AliMpArea &area, const AliMpVSegmentation *seg[2])
Int_t fNClusters
! total number of clusters
TObjArray * fPixArray
! collection of pixels
void FlagLocalMax(TH2D *hist, Int_t i, Int_t j, Int_t *isLocalMax)
The abstract base class for the segmentation.
AliMUONClusterFinderPeakFit(Bool_t plot, AliMUONVClusterFinder *clusterFinder)
const AliMpVSegmentation * fkSegmentation[2]
! new segmentation
static const Int_t fgkCoupled
coupled pad
TObjArray fClusterList
! clusters corresponding to the current pre-cluster
AliMUONMathieson * fMathieson
! Mathieson to compute the charge repartition
Int_t FindLocalMaxima(TObjArray *pixArray, Int_t *localMax, Double_t *maxVal)
Cluster finder in MUON arm of ALICE.
static const Double_t fgkZeroSuppression
average zero suppression value
Bool_t fPlot
! whether we should plot thing (for debug only, quite slow!)
void FindClusterCOG(AliMUONCluster &cluster, const Int_t *localMax, Int_t iMax)
static const TVector2 fgkIncreaseSize
idem
void BuildPixArray(AliMUONCluster &cluster)
build array of pixels
AliMUONVClusterFinder * fPreClusterFinder
! the pre-clustering worker
Combination of digit and mppad informations.
Definition: AliMUONPad.h:25
Int_t GetNMax() const
Return the number of local maxima.
Int_t fNMax
! number of local maxima