]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSClusterFinder.h
Removed warning from part of code not properly implimneted yet.
[u/mrichter/AliRoot.git] / ITS / AliITSClusterFinder.h
1 #ifndef ALIITSCLUSTERFINDER_H
2 #define ALIITSCLUSTERFINDER_H
3  
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6  
7 /* $Id$ */
8
9 ////////////////////////////////////////////////
10 //  ITS Cluster Finder Class                  //
11 ////////////////////////////////////////////////
12
13 #include <TObject.h>
14 #include <TClonesArray.h>
15
16 class AliITSMap;
17 class AliITSresponse;
18 class AliITSsegmentation;
19 class AliITSRawCluster;
20 class AliITS;
21 class AliITSdigit;
22 class AliITSRecPoint;
23
24 //----------------------------------------------------------------------
25 class AliITSClusterFinder :public TObject{
26  public:
27     AliITSClusterFinder();
28     AliITSClusterFinder(AliITSsegmentation *seg, AliITSresponse *resp,
29                         TClonesArray *digits);
30     virtual ~AliITSClusterFinder();
31     AliITSClusterFinder(const AliITSClusterFinder &source); // copy constructor
32     // assignment operator
33     AliITSClusterFinder& operator=(const AliITSClusterFinder &source);
34     virtual void SetResponse(AliITSresponse *response) {
35         // set response
36         fResponse=response;
37     }
38     virtual void SetSegmentation(AliITSsegmentation *segmentation) {
39         // set segmentation
40         fSegmentation=segmentation;
41     }
42     virtual void SetDigits(TClonesArray *ITSdigits) {
43         // set digits
44         fDigits=ITSdigits;
45         fNdigits = fDigits->GetEntriesFast();
46     }
47     virtual AliITSdigit* GetDigit(Int_t i){
48         return (AliITSdigit*) fDigits->UncheckedAt(i);
49     }
50     virtual TClonesArray* Digits(){
51         return fDigits;
52     }
53     virtual Int_t   NDigits() const {
54         // Get Number of Digits
55         return fNdigits;
56     }
57     AliITSMap   *Map() {
58         // map
59         return fMap;
60     }
61     //
62     virtual void AddCluster(Int_t branch, AliITSRawCluster *c);
63     virtual void AddCluster(Int_t branch, AliITSRawCluster *c,
64                             AliITSRecPoint &rp);
65     virtual void FindRawClusters(Int_t mod=0); // Finds cluster of digits.
66     // Determins if digit i has a neighbor and if so that neighor index is j.
67     virtual Bool_t IsNeighbor(TObjArray *digs,Int_t i,Int_t j[]) const;
68     // Given a cluster of digits, creates the nessesary RecPoint. May also
69     // do some peak separation.
70     virtual void CreateRecPoints(TObjArray *cluster,Int_t mod){};
71     virtual void FindCluster(Int_t i, Int_t j, AliITSRawCluster *c) {
72         // find cluster
73     }
74     virtual void Decluster(AliITSRawCluster *cluster) {
75         // Decluster
76     }
77     virtual void SetNperMax(Int_t npermax=3) {
78         // Set max. Number of cells per local cluster
79         fNperMax = npermax;
80     }
81     virtual void SetDeclusterFlag(Int_t flag=1) {
82         // Decluster ?
83         fDeclusterFlag =flag;
84     }
85     virtual void SetClusterSize(Int_t clsize=3) {
86         // Set max. cluster size ; bigger clusters will be rejected
87         fClusterSize = clsize;
88     }
89     virtual void CalibrateCOG() {
90         // Self Calibration of COG 
91     }
92     virtual void CorrectCOG(){
93         // correct COG
94     }
95     virtual Bool_t Centered(AliITSRawCluster *cluster) const {
96         // cluster
97         return kTRUE;
98     }
99     virtual void   SplitByLocalMaxima(AliITSRawCluster *cluster) {
100         // split by local maxima
101     }
102     virtual void   FillCluster(AliITSRawCluster *cluster, Int_t) {
103         // fiil cluster
104     }
105     virtual void   FillCluster(AliITSRawCluster *cluster) {
106         // fill cluster
107         FillCluster(cluster,1);
108     }
109     // set the fitting methods in the derived classes
110     // data members
111
112  
113  protected:
114     TClonesArray       *fDigits;       //! digits
115     Int_t              fNdigits;       //! num of digits 
116     AliITSresponse     *fResponse;     //! response
117     AliITSsegmentation *fSegmentation; //!segmentation
118     Int_t              fNRawClusters;  //! in case we split the cluster
119                                        // and want to keep track of 
120                                        // the cluster which was splitted
121     AliITSMap          *fMap;          //! map
122     Int_t              fNperMax;       //! NperMax
123     Int_t              fDeclusterFlag; //! DeclusterFlag
124     Int_t              fClusterSize;   //! ClusterSize
125     Int_t              fNPeaks;        //! NPeaks  
126   
127     ClassDef(AliITSClusterFinder,2) //Class for clustering and reconstruction of space points
128 };
129 #endif