]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSClusterFinder.h
bug fixes
[u/mrichter/AliRoot.git] / ITS / AliITSClusterFinder.h
CommitLineData
b0f5e3fc 1#ifndef ALIITSCLUSTERFINDER_H
2#define ALIITSCLUSTERFINDER_H
9de0700b 3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7/* $Id$ */
b0f5e3fc 8
9////////////////////////////////////////////////
e8189707 10// ITS Cluster Finder Class //
b0f5e3fc 11////////////////////////////////////////////////
12
aacedc3e 13#include <Riostream.h>
e8189707 14#include <TObject.h>
15#include <TClonesArray.h>
16
17class AliITSMap;
18class AliITSresponse;
19class AliITSsegmentation;
20class AliITSRawCluster;
21class AliITS;
8ca6a9a5 22class AliITSdigit;
9355b256 23class AliITSRecPoint;
b0f5e3fc 24
9de0700b 25//----------------------------------------------------------------------
26class AliITSClusterFinder :public TObject{
aacedc3e 27 public:
28a570fd 28 AliITSClusterFinder(); // Default constructor
aacedc3e 29 // Standard Constructor
30 AliITSClusterFinder(AliITSsegmentation *seg, AliITSresponse *resp);
9de0700b 31 AliITSClusterFinder(AliITSsegmentation *seg, AliITSresponse *resp,
aacedc3e 32 TClonesArray *digits);// Standard+ Constructor
28a570fd 33 virtual ~AliITSClusterFinder(); // Destructor
9de0700b 34 AliITSClusterFinder(const AliITSClusterFinder &source); // copy constructor
35 // assignment operator
36 AliITSClusterFinder& operator=(const AliITSClusterFinder &source);
9de0700b 37 //
aacedc3e 38 // Do the Reconstruction.
f8d9a5b8 39 virtual void FindRawClusters(Int_t mod=0); // Finds cluster of digits.
aacedc3e 40 //
41 // Sets the debug flag for debugging output
42 void SetDebug(Int_t level=1){fDebug=level;}
43 // Clears the debug flag so no debugging output will be generated
44 void SetNoDebug(){fDebug=0;}
45 // Returns the debug flag value
5d766c75 46 Bool_t GetDebug(Int_t level=1)const {return fDebug>=level;}
aacedc3e 47 //
48 // Setters and Getters
49 // segmentation
50 virtual void SetSegmentation(AliITSsegmentation *segmentation) {
51 fSegmentation=segmentation;}
52 //Returns fSegmentation
53 virtual AliITSsegmentation* GetSegmentation()const{return fSegmentation;}
54 // Digit
55 virtual void SetDigits(TClonesArray *itsDigits) {// set digits
56 fDigits=itsDigits;fNdigits = fDigits->GetEntriesFast();}
57 virtual AliITSdigit* GetDigit(Int_t i){ // Returns ith digit
58 return (AliITSdigit*) fDigits->UncheckedAt(i);}
59 virtual TClonesArray* Digits(){return fDigits;}// Gets fDigits
60 virtual Int_t NDigits() const {return fNdigits;}// Get Number of Digits
61 // Response
62 //Return Response
63 virtual AliITSresponse* GetResponse()const{return fResponse;}
64 virtual void SetResponse(AliITSresponse *response) {// set response
65 fResponse=response;}
66 // clulsters
67 // Set fClusters up
68 virtual void SetClusters(TClonesArray *itsClusters){// set clusters
69 fClusters = itsClusters;fNRawClusters = fClusters->GetEntriesFast();}
70 // Get fCluters
71 virtual TClonesArray* Clusters(){return fClusters;}
72 // Get fCluter
73 virtual AliITSRawCluster* Cluster(Int_t i){
74 return (AliITSRawCluster*)(fClusters->At(i));}
75 // Returns the present number of enteries
76 virtual Int_t NClusters()const {return fClusters->GetEntriesFast();}
77 // returns fNRawClusters
78 virtual Int_t GetNRawClusters() const {return fNRawClusters;}
f8d9a5b8 79 // Determins if digit i has a neighbor and if so that neighor index is j.
aacedc3e 80 virtual void AddCluster(Int_t branch,AliITSRawCluster *c);
81 virtual void AddCluster(Int_t branch,AliITSRawCluster *c,
82 AliITSRecPoint &rp);
83 virtual void FillCluster(AliITSRawCluster *,Int_t) {}// fiil cluster
84 virtual void FillCluster(AliITSRawCluster *cluster) {// fill cluster
85 FillCluster(cluster,1);}
86 virtual void FindCluster(Int_t,Int_t,AliITSRawCluster *) {}// find cluster
87 //
88 virtual void SetModule(Int_t module){fModule = module;}// Set module number
89 virtual Int_t GetModule()const{return fModule;}// Returns module number
90 //
91 // RecPoints
f8d9a5b8 92 // Given a cluster of digits, creates the nessesary RecPoint. May also
93 // do some peak separation.
ac74f489 94 virtual void CreateRecPoints(TObjArray *,Int_t){};
aacedc3e 95 // Others
96 virtual void SetMap(AliITSMap *m) {fMap=m;}// map
97 AliITSMap* Map(){return fMap;}// map
98 virtual Int_t GetNperMax() const {return fNperMax;}// returns fNperMax
99 // returns fDeclusterFlag
100 virtual Int_t GetDeclusterFlag()const{return fDeclusterFlag;}
101 // returns fClusterSize
102 virtual Int_t GetClusterSize() const {return fClusterSize;}
103 virtual Int_t GetNPeaks() const {return fNPeaks;}// returns fNPeaks
104 //
105 virtual Bool_t IsNeighbor(TObjArray *digs,Int_t i,Int_t j[]) const;
ac74f489 106 virtual void Decluster(AliITSRawCluster *) {}// Decluster
aacedc3e 107 // Set max. Number of cells per local cluster
108 virtual void SetNperMax(Int_t npermax=3) {fNperMax = npermax;}
109 //Decluster
110 virtual void SetDeclusterFlag(Int_t flag=1){fDeclusterFlag=flag;}
111 // Set max. cluster size ; bigger clusters will be rejected
112 virtual void SetClusterSize(Int_t clsize=3) {fClusterSize = clsize;}
113 virtual void CalibrateCOG() {}// Self Calibration of COG
114 virtual void CorrectCOG(){}// correct COG
115 virtual Bool_t Centered(AliITSRawCluster *) const {return kTRUE;}// cluster
116 //split by local maxima
117 virtual void SplitByLocalMaxima(AliITSRawCluster *){}
118 // IO functions
119 void Print(ostream *os); // Class ascii print function
120 void Read(istream *os); // Class ascii read function
e8189707 121
aacedc3e 122 // data members
123 protected:
124 Int_t fDebug; //! Debug flag/level
125 Int_t fModule; //! Module number to be reconstuctted
bf3f2830 126 TClonesArray *fDigits; //! digits
88cb7938 127 Int_t fNdigits; //! num of digits
128
9de0700b 129 AliITSresponse *fResponse; //! response
aacedc3e 130 AliITSsegmentation *fSegmentation; //! segmentation
131 TClonesArray *fClusters; //! Array of clusters
9de0700b 132 Int_t fNRawClusters; //! in case we split the cluster
133 // and want to keep track of
134 // the cluster which was splitted
135 AliITSMap *fMap; //! map
136 Int_t fNperMax; //! NperMax
137 Int_t fDeclusterFlag; //! DeclusterFlag
138 Int_t fClusterSize; //! ClusterSize
139 Int_t fNPeaks; //! NPeaks
aacedc3e 140
141 ClassDef(AliITSClusterFinder,3) //Class for clustering and reconstruction of space points
9de0700b 142};
aacedc3e 143// Input and output functions for standard C++ input/output.
144ostream &operator<<(ostream &os,AliITSClusterFinder &source);
145istream &operator>>(istream &os,AliITSClusterFinder &source);
b0f5e3fc 146#endif