]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONClusterFinderVS.h
Cache the InversePitch instead of computing it each time.
[u/mrichter/AliRoot.git] / MUON / AliMUONClusterFinderVS.h
1 #ifndef ALIMUONCLUSTERFINDERVS_H
2 #define ALIMUONCLUSTERFINDERVS_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 // Revision of includes 07/05/2004
8
9 /// \ingroup rec
10 /// \class AliMUONClusterFinderVS
11 /// \brief Class for clustering and reconstruction of space points
12 ///
13 /////////////////////////////////////////////////
14 ///  MUON Cluster Finder Class                 //
15 /////////////////////////////////////////////////
16
17 #include <TObject.h>
18
19 class TClonesArray;
20
21 class AliMUONClusterInput;
22 class AliMUONDigitMapA1;
23 class AliMUONGeometrySegmentation;
24 class AliMUONRawCluster;
25 class AliMUONDigit;
26
27
28 class AliMUONClusterFinderVS : public TObject 
29 {
30  public:
31     AliMUONClusterFinderVS();
32     virtual ~AliMUONClusterFinderVS();
33 // Decluster ?
34     virtual void SetDeclusterFlag(Int_t flag=1) {fDeclusterFlag =flag;}
35 // Set max. cluster size ; bigger clusters will deconvoluted
36     virtual void SetClusterSize(Int_t clsize=5) {fClusterSize = clsize;}
37 // Set max. number of pads per local cluster
38     virtual void SetNperMax(Int_t npermax=5) {fNperMax = npermax;}
39 // Search for raw clusters
40     virtual void  FindRawClusters();
41 // Find cluster    
42     virtual void  FindCluster(Int_t i, Int_t j, Int_t cath, AliMUONRawCluster &c);
43 // Decluster
44     virtual void Decluster(AliMUONRawCluster *cluster);
45 //  Perform split by local maxima  
46     virtual void   SplitByLocalMaxima(AliMUONRawCluster *cluster);
47     virtual void   FindLocalMaxima(AliMUONRawCluster *cluster);
48     virtual void   Split(AliMUONRawCluster * cluster);
49 //  Perform Double Mathieson Fit
50     Bool_t  DoubleMathiesonFit(AliMUONRawCluster *c, Int_t cath);
51     Float_t CombiDoubleMathiesonFit(AliMUONRawCluster *c);
52     Float_t SingleMathiesonFit(AliMUONRawCluster *c, Int_t cath);
53     Float_t CombiSingleMathiesonFit(AliMUONRawCluster *c);    
54 //  Build up full cluster information    
55     virtual void   FillCluster(AliMUONRawCluster *cluster, Int_t flag, Int_t cath);
56     virtual void   FillCluster(AliMUONRawCluster *cluster, Int_t cath);
57     virtual void   FillCluster(AliMUONRawCluster *cluster) {FillCluster(cluster,1,0);}
58 // Add a new raw cluster    
59     virtual void AddRawCluster(AliMUONRawCluster& cluster);
60 //  Set tracks for debugging    
61     virtual void SetTracks(Int_t t1, Int_t t2) {fTrack[0]=t1; fTrack[1]=t2;}
62     void SetGhostChi2Cut(Float_t cut) {fGhostChi2Cut = cut;}
63 // get raw cluster pointer 
64     TClonesArray*  GetRawClusters() {return fRawClusters;}
65 // reset raw clusters
66     void ResetRawClusters();
67
68  protected:
69     AliMUONClusterFinderVS(const AliMUONClusterFinderVS& clusterFinder);
70 //  Assignment operator
71     AliMUONClusterFinderVS & operator = (const AliMUONClusterFinderVS& rhs);
72
73     AliMUONClusterInput*          fInput;              // ! AliMUONClusterInput instance
74     AliMUONDigitMapA1*            fDigitMap[2];          // Hit Maps for cathode 1 and 2
75     AliMUONGeometrySegmentation*  fSeg2[2];            // New Segmentations for cathode 1 and 2
76
77     
78 // Configuration    
79     Int_t                   fDeclusterFlag;      // flag for declusterin
80     Int_t                   fClusterSize;        // cluster size 
81     Int_t                   fNperMax;            // Maximum number of pads per peak
82     Float_t                 fGhostChi2Cut;       // Cut in charge matching chi2
83                                                  // (2 degrees of freedom)
84                                                  // Used by ghost removal
85     // Current decluster result    
86     Int_t                   fMul[2];             // current multiplicity
87     Int_t                   fNPeaks;             // number of local maxima
88     Int_t                   fNRawClusters;       // Number of Raw Clusters
89     TClonesArray*           fRawClusters;        // array of cluster per ch.
90
91     // Local data store    
92     AliMUONDigit*           fDig[100][2];        // current list of digits 
93     Int_t                   fIx[100][2];         // current list of x-pad-coord.
94     Int_t                   fIy[100][2];         // current list of y-pad-coord.
95     Float_t                 fX[100][2];          // current list of x-coord.
96     Float_t                 fY[100][2];          // current list of y-coord.
97     Float_t                 fZ[100][2];          // current list of z-coord.
98     Int_t                   fIndLocal[100][2];   // indices of local maxima
99     Int_t                   fNLocal[2];          // Number of local maxima
100     Int_t                   fQ[100][2];          // current list of charges
101     Float_t                 fZPlane;             // currenz z-plane position
102     Int_t                   fSector;             // current sector
103     
104     // Current Fit
105     Double_t                 fXFit[2];         // x-coordinate
106     Double_t                 fYFit[2];         // y-coordinate
107     Double_t                 fQrFit[2];        // charge ratio
108     Float_t                  fChi2[2];         // chi2 of fit
109     Float_t                  fXInit[2];        // start values
110     Float_t                  fYInit[2];        // start values
111     Float_t                  fQrInit[2];       // start values
112     Int_t                    fFitStat;         // status of fit
113     
114     // Selected track for debugging
115     Int_t                    fTrack[2];        // Only digits with main contributions from these tracks are
116     // considered 
117     
118     //  Return pointer to raw clusters    
119     ClassDef(AliMUONClusterFinderVS,2) //Class for clustering and reconstruction of space points
120       };
121 #endif
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136