]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - ITS/AliITSClusterFinder.h
Adapt to new QuadSet implementation.
[u/mrichter/AliRoot.git] / ITS / AliITSClusterFinder.h
... / ...
CommitLineData
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////////////////////////////////////////////////
14
15#include <TObject.h>
16#include <TClonesArray.h>
17
18class AliITSMap;
19class AliITSresponse;
20class AliITSsegmentation;
21class AliITSRawCluster;
22class AliITSgeom;
23class AliITSdigit;
24class AliITSRecPoint;
25class AliITSDetTypeRec;
26
27//----------------------------------------------------------------------
28class AliITSClusterFinder :public TObject{
29 public:
30 AliITSClusterFinder(); // Default constructor
31 // Standard Constructor
32 AliITSClusterFinder(AliITSDetTypeRec* dettyp);
33 AliITSClusterFinder(AliITSDetTypeRec* dettyp,TClonesArray *digits);// Standard+ Constructor
34 virtual ~AliITSClusterFinder(); // Destructor
35 //
36 // Do the Reconstruction.
37 virtual void FindRawClusters(Int_t mod=0); // Finds cluster of digits.
38 //
39 // Sets the debug flag for debugging output
40 void SetDebug(Int_t level=1){fDebug=level;}
41 // Clears the debug flag so no debugging output will be generated
42 void SetNoDebug(){fDebug=0;}
43 // Returns the debug flag value
44 Bool_t GetDebug(Int_t level=1)const {return fDebug>=level;}
45 // Digit
46 virtual void SetDigits(TClonesArray *itsDigits) {// set digits
47 fDigits=itsDigits;fNdigits = fDigits->GetEntriesFast();}
48 virtual AliITSdigit* GetDigit(Int_t i){ // Returns ith digit
49 return (AliITSdigit*) fDigits->UncheckedAt(i);}
50 virtual TClonesArray* Digits(){return fDigits;}// Gets fDigits
51 virtual Int_t NDigits() const {return fNdigits;}// Get Number of Digits
52 // clulsters
53 // Set fClusters up
54 virtual void SetClusters(TClonesArray *itsClusters){// set clusters
55 fClusters = itsClusters;fNRawClusters = fClusters->GetEntriesFast();}
56 // Get fCluters
57 virtual TClonesArray* Clusters(){return fClusters;}
58 // Get fCluter
59 virtual AliITSRawCluster* Cluster(Int_t i){
60 return (AliITSRawCluster*)(fClusters->At(i));}
61 // Returns the present number of enteries
62 virtual Int_t NClusters()const {return fClusters->GetEntriesFast();}
63 // returns fNRawClusters
64 virtual Int_t GetNRawClusters() const {return fNRawClusters;}
65 // Determins if digit i has a neighbor and if so that neighor index is j.
66 virtual void AddCluster(Int_t branch,AliITSRawCluster *c);
67 virtual void AddCluster(Int_t branch,AliITSRawCluster *c,
68 AliITSRecPoint &rp);
69 virtual void FillCluster(AliITSRawCluster *,Int_t) {}// fiil cluster
70 virtual void FillCluster(AliITSRawCluster *cluster) {// fill cluster
71 FillCluster(cluster,1);}
72
73 virtual void SetModule(Int_t module){fModule = module;}// Set module number
74 virtual Int_t GetModule()const {return fModule;}// Returns module number
75 //
76 // RecPoints
77 // Given a cluster of digits, creates the nessesary RecPoint. May also
78 // do some peak separation.
79 virtual void CreateRecPoints(TObjArray *,Int_t){};
80 // Others
81 virtual void SetMap(AliITSMap *m) {fMap=m;}// map
82 AliITSMap* Map(){return fMap;}// map
83 virtual Int_t GetNperMax() const {return fNperMax;}// returns fNperMax
84 // returns fDeclusterFlag
85 virtual Int_t GetDeclusterFlag()const{return fDeclusterFlag;}
86 // returns fClusterSize
87 virtual Int_t GetClusterSize() const {return fClusterSize;}
88 virtual Int_t GetNPeaks() const {return fNPeaks;}// returns fNPeaks
89 //
90 virtual Bool_t IsNeighbor(TObjArray *digs,Int_t i,Int_t j[]) const;
91 virtual void Decluster(AliITSRawCluster *) {}// Decluster
92 // Set max. Number of cells per local cluster
93 virtual void SetNperMax(Int_t npermax=3) {fNperMax = npermax;}
94 //Decluster
95 virtual void SetDeclusterFlag(Int_t flag=1){fDeclusterFlag=flag;}
96 // Set max. cluster size ; bigger clusters will be rejected
97 virtual void SetClusterSize(Int_t clsize=3) {fClusterSize = clsize;}
98 virtual void CalibrateCOG() {}// Self Calibration of COG
99 virtual void CorrectCOG(){}// correct COG
100 virtual Bool_t Centered(AliITSRawCluster *) const {return kTRUE;}// cluster
101 //split by local maxima
102 virtual void SplitByLocalMaxima(AliITSRawCluster *){}
103 // IO functions
104 void Print(ostream *os) const; // Class ascii print function
105 void Read(istream *os); // Class ascii read function
106 virtual void Print(Option_t *option="") const {TObject::Print(option);}
107 virtual Int_t Read(const char *name) {return TObject::Read(name);}
108
109 virtual void SetDetTypeRec(AliITSDetTypeRec* dtr) {fDetTypeRec=dtr;}
110 AliITSDetTypeRec* GetDetTypeRec() const {return fDetTypeRec;}
111
112 void InitGeometry();
113
114 protected:
115 // data members
116
117 Int_t fDebug; //! Debug flag/level
118 Int_t fModule; //! Module number to be reconstuctted
119 TClonesArray *fDigits; //! digits
120 Int_t fNdigits; //! num of digits
121
122 AliITSDetTypeRec* fDetTypeRec; //ITS object for reconstruction
123 TClonesArray *fClusters; //! Array of clusters
124 Int_t fNRawClusters; //! in case we split the cluster
125 // and want to keep track of
126 // the cluster which was splitted
127 AliITSMap *fMap; //! map
128 Int_t fNperMax; //! NperMax
129 Int_t fDeclusterFlag; //! DeclusterFlag
130 Int_t fClusterSize; //! ClusterSize
131 Int_t fNPeaks; //! NPeaks
132 // Data members needed to fill AliCluster objects
133 Float_t fYshift[2200]; // y-shifts of detector local coor. systems
134 Float_t fZshift[2200]; // z-shifts of detector local coor. systems
135 Int_t fNdet[2200]; // detector index
136 Int_t fNlayer[2200]; // detector layer
137
138 private:
139 AliITSClusterFinder(const AliITSClusterFinder &source); // copy constructor
140 // assignment operator
141 AliITSClusterFinder& operator=(const AliITSClusterFinder &source);
142
143
144 ClassDef(AliITSClusterFinder,6) //Class for clustering and reconstruction of space points
145};
146// Input and output functions for standard C++ input/output.
147ostream &operator<<(ostream &os,AliITSClusterFinder &source);
148istream &operator>>(istream &os,AliITSClusterFinder &source);
149#endif