]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONClusterFinder.h
More consequent seperation of global input data services (AliMUONClusterInput singlet...
[u/mrichter/AliRoot.git] / MUON / AliMUONClusterFinder.h
1 #ifndef ALIMUONCLUSTERFINDER_H
2 #define ALIMUONCLUSTERFINDER_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
8 ////////////////////////////////////////////////
9 //  MUON Cluster Finder Class                 //
10 ////////////////////////////////////////////////
11 #include "TObject.h"
12 class AliMUONHitMap;
13 class AliMUONHitMapA1;
14 class AliMUONDigit;
15 class TClonesArray;
16 class AliMUONSegmentation;
17 class AliMUONResponse;
18 class AliMUONRawCluster;
19
20 class TF1;
21
22 const Int_t kMaxNeighbours = 24; // max number of neighbours
23
24 class AliMUONClusterFinder :
25  public TObject
26 {
27  public:
28     AliMUONClusterFinder
29         (AliMUONSegmentation *segmentation,
30          AliMUONResponse *response, TClonesArray *digits, Int_t chamber);
31     AliMUONClusterFinder(const AliMUONClusterFinder& clusterFinder);
32     AliMUONClusterFinder();
33     virtual  ~AliMUONClusterFinder(); 
34 // Set segmentation model    
35     virtual void SetSegmentation(
36         AliMUONSegmentation *segmentation){
37         fSegmentation[0]=segmentation;
38     }
39 // Set response model    
40     virtual void SetResponse(AliMUONResponse *response) {
41         fResponse=response;
42     }
43 // Set pointer to digits
44     virtual void SetDigits(TClonesArray *MUONdigits);
45     virtual void SetDigits(TClonesArray *MUONdigits1,
46                            TClonesArray *MUONdigits2 ) {;}
47
48 // Set current chamber id    
49     virtual void SetChamber(Int_t ich){
50         fChamber=ich;
51     }
52 // Add a new raw cluster    
53     virtual void AddRawCluster(const AliMUONRawCluster cluster);
54 // Search for raw clusters
55     virtual void FindRawClusters();
56 // Find cluster    
57     virtual void  FindCluster(Int_t i, Int_t j, AliMUONRawCluster &c);
58 // Decluster
59     virtual void Decluster(AliMUONRawCluster *cluster);
60 // Set max. number of pads per local cluster
61     virtual void SetNperMax(Int_t npermax=5) {fNperMax = npermax;}
62 // Decluster ?
63     virtual void SetDeclusterFlag(Int_t flag=1) {fDeclusterFlag =flag;}
64 // Set max. cluster size ; bigger clusters will deconvoluted
65     virtual void SetClusterSize(Int_t clsize=5) {fClusterSize = clsize;}
66 // Self Calibration of COG 
67     virtual void CalibrateCOG();
68 // Perform fit to sinoidal function    
69     virtual void SinoidalFit(Float_t x, Float_t y, TF1 &func);
70 //
71     virtual void CorrectCOG(){;}
72 //  True if 3-cluster is centred
73     virtual Bool_t Centered(AliMUONRawCluster *cluster);
74 //  Perform split by local maxima  
75     virtual void   SplitByLocalMaxima(AliMUONRawCluster *cluster);
76 //  Perform Double Mathieson Fit
77     Bool_t  DoubleMathiesonFit(AliMUONRawCluster *c);
78     Bool_t SingleMathiesonFit(AliMUONRawCluster *c);    
79 //  Build up full cluster information    
80     virtual void   FillCluster(AliMUONRawCluster *cluster, Int_t n);
81     virtual void   FillCluster(AliMUONRawCluster *cluster) {
82         FillCluster(cluster,1);}
83     virtual void SetTracks(Int_t, Int_t) {;}
84     virtual Bool_t TestTrack(Int_t) {return kTRUE;}    
85     
86 //  Return pointer to raw clusters    
87     TClonesArray* RawClusters(){return fRawClusters;}
88 //  Assignment operator
89     AliMUONClusterFinder & operator = (const AliMUONClusterFinder& rhs);
90     
91 protected:
92     TClonesArray*           fDigits;         // Digits
93     Int_t                   fNdigits;        // Number of Digits
94     AliMUONSegmentation*    fSegmentation[2];   // Chamber segmentation
95     AliMUONResponse*        fResponse;       // Chamber Response
96     TClonesArray*           fRawClusters;    // Raw Clusters
97     Int_t                   fChamber;        // Chamber Number
98     Int_t                   fNRawClusters;   // Number of Raw Clusters
99     AliMUONHitMapA1*        fHitMap;         // Hit Map
100     TF1*                    fCogCorr;        // Systematic correction function 
101     Int_t                   fNperMax;        // Maximum number of pads per
102                                              // local maximum 
103     Int_t                   fDeclusterFlag;  // flaf for declusterin
104     Int_t                   fClusterSize;    // cluster size 
105     Int_t                   fNPeaks;         // number of local maxima
106 //  Current cluster    
107     AliMUONDigit*           fDig[100];        // current list of digits 
108     Int_t                   fIx[100];         // current list of x-pad-coord.
109     Int_t                   fIy[100];         // current list of y-pad-coord.
110     Float_t                 fX[100];          // current list of x-coord.
111     Float_t                 fY[100];          // current list of y-coord.
112     Int_t                   fIndLocal[100];   // indices of local maxima
113     Int_t                   fNLocal;          // Number of local maxima
114     Int_t                   fQ[100];          // current list of charges
115     Int_t                   fMul;             // current multiplicity
116     ClassDef(AliMUONClusterFinder,1) //Class for clustering and reconstruction of space points
117 };
118 #endif
119
120
121
122
123
124
125