1 #ifndef ALIITSCLUSTERFINDER_H
2 #define ALIITSCLUSTERFINDER_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
9 ////////////////////////////////////////////////
10 // ITS Cluster Finder Class //
11 ////////////////////////////////////////////////
14 #include <TClonesArray.h>
18 class AliITSsegmentation;
19 class AliITSRawCluster;
24 //----------------------------------------------------------------------
25 class AliITSClusterFinder :public TObject{
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
36 virtual void SetSegmentation(AliITSsegmentation *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
45 virtual Int_t NDigits() const {// Get Number of Digits
48 virtual AliITSresponse * GetResp(){// Returns 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
56 virtual Int_t GetNperMax() const { // returns fNperMax
58 virtual Int_t GetDeclusterFlag() const { // returns fDeclusterFlag
59 return fDeclusterFlag;}
60 virtual Int_t GetClusterSize() const { // returns fClusterSize
62 virtual Int_t GetNPeaks() const { // returns fNPeaks
65 virtual void AddCluster(Int_t branch, AliITSRawCluster *c);
66 virtual void AddCluster(Int_t branch, AliITSRawCluster *c,
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
80 virtual void SetDeclusterFlag(Int_t flag=1) {
84 virtual void SetClusterSize(Int_t clsize=3) {
85 // Set max. cluster size ; bigger clusters will be rejected
86 fClusterSize = clsize;
88 virtual void CalibrateCOG() {
89 // Self Calibration of COG
91 virtual void CorrectCOG(){
94 virtual Bool_t Centered(AliITSRawCluster *) const {// cluster
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);
102 // set the fitting methods in the derived classes
106 TClonesArray *fDigits; //! digits
107 Int_t fNdigits; //! num of digits
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
120 ClassDef(AliITSClusterFinder,2) //Class for clustering and reconstruction of space points