]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSClusterFinder.h
Moved coordinates
[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(); // Default constructor
28     AliITSClusterFinder(AliITSsegmentation *seg, AliITSresponse *resp,
29                         TClonesArray *digits);// Standard Constructor
30     virtual ~AliITSClusterFinder(); // Destructor
31     AliITSClusterFinder(const AliITSClusterFinder &source); // copy constructor
32     // assignment operator
33     AliITSClusterFinder& operator=(const AliITSClusterFinder &source);
34     virtual void SetResponse(AliITSresponse *response) {// set response
35         fResponse=response;}
36     virtual void SetSegmentation(AliITSsegmentation *segmentation) {
37         // set segmentation
38         fSegmentation=segmentation;}
39     virtual void SetDigits(TClonesArray *ITSdigits) {// set digits
40         fDigits=ITSdigits;fNdigits = fDigits->GetEntriesFast();}
41     virtual AliITSdigit* GetDigit(Int_t i){ // Returns ith digit
42         return (AliITSdigit*) fDigits->UncheckedAt(i);}
43     virtual TClonesArray* Digits(){ // Gets fDigits
44         return fDigits;}
45     virtual Int_t   NDigits() const {// Get Number of Digits
46         return fNdigits;}
47     // Standard Getters.
48     virtual AliITSresponse * GetResp(){// Returns fResponse
49         return fResponse;}
50     virtual AliITSsegmentation * GetSeg(){// Returns fSegmentation
51         return fSegmentation;}
52     virtual Int_t GetNRawClusters() const { // returns fNRawClusters
53         return fNRawClusters;}
54     AliITSMap   *Map() {// map
55         return fMap;}
56     virtual Int_t GetNperMax() const { // returns fNperMax
57         return fNperMax;}
58     virtual Int_t GetDeclusterFlag() const { // returns fDeclusterFlag
59         return fDeclusterFlag;}
60     virtual Int_t GetClusterSize() const { // returns fClusterSize
61         return fClusterSize;}
62     virtual Int_t GetNPeaks() const { // returns fNPeaks
63         return fNPeaks;}
64     //
65     virtual void AddCluster(Int_t branch, AliITSRawCluster *c);
66     virtual void AddCluster(Int_t branch, AliITSRawCluster *c,
67                             AliITSRecPoint &rp);
68     virtual void FindRawClusters(Int_t mod=0); // Finds cluster of digits.
69     // Determins if digit i has a neighbor and if so that neighor index is j.
70     virtual Bool_t IsNeighbor(TObjArray *digs,Int_t i,Int_t j[]) const;
71     // Given a cluster of digits, creates the nessesary RecPoint. May also
72     // do some peak separation.
73     virtual void CreateRecPoints(TObjArray *,Int_t){};
74     virtual void FindCluster(Int_t,Int_t,AliITSRawCluster *) {}// find cluster
75     virtual void Decluster(AliITSRawCluster *) {}// Decluster
76     virtual void SetNperMax(Int_t npermax=3) {
77         // Set max. Number of cells per local cluster
78         fNperMax = npermax;
79     }
80     virtual void SetDeclusterFlag(Int_t flag=1) {
81         // Decluster ?
82         fDeclusterFlag =flag;
83     }
84     virtual void SetClusterSize(Int_t clsize=3) {
85         // Set max. cluster size ; bigger clusters will be rejected
86         fClusterSize = clsize;
87     }
88     virtual void CalibrateCOG() {
89         // Self Calibration of COG 
90     }
91     virtual void CorrectCOG(){
92         // correct COG
93     }
94     virtual Bool_t Centered(AliITSRawCluster *) const {// cluster
95         return kTRUE;
96     }
97     virtual void SplitByLocalMaxima(AliITSRawCluster *){}//split by local maxima
98     virtual void   FillCluster(AliITSRawCluster *,Int_t) {}// fiil cluster
99     virtual void   FillCluster(AliITSRawCluster *cluster) {// fill cluster
100         FillCluster(cluster,1);
101     }
102     // set the fitting methods in the derived classes
103     // data members
104
105 protected:
106     TClonesArray       *fDigits;       //! digits
107     Int_t              fNdigits;       //! num of digits
108
109     AliITSresponse     *fResponse;     //! response
110     AliITSsegmentation *fSegmentation; //!segmentation
111     Int_t              fNRawClusters;  //! in case we split the cluster
112                                        // and want to keep track of 
113                                        // the cluster which was splitted
114     AliITSMap          *fMap;          //! map
115     Int_t              fNperMax;       //! NperMax
116     Int_t              fDeclusterFlag; //! DeclusterFlag
117     Int_t              fClusterSize;   //! ClusterSize
118     Int_t              fNPeaks;        //! NPeaks  
119   
120     ClassDef(AliITSClusterFinder,2) //Class for clustering and reconstruction of space points
121 };
122 #endif