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